This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os | |
import subprocess | |
import RPi.GPIO as GPIO | |
import time | |
GPIO.setmode(GPIO.BOARD) | |
GPIO.setup(12,GPIO.IN) | |
while True: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from astro_pi import AstroPi | |
import time | |
import sys | |
ap = AstroPi() | |
f = open("data_file.txt", "w") | |
for i in range (0,10): | |
localtime = time.asctime(time.localtime(time.time())) | |
print localtime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import libraries | |
import time | |
import RPi.GPIO as GPIO | |
# Setup GPIO pins | |
GPIO.setmode(GPIO.BOARD) | |
GPIO.setup(3,GPIO.OUT) | |
GPIO.setup(5,GPIO.OUT) | |
GPIO.setup(7,GPIO.OUT) | |
#Switch off all the LEDs | |
GPIO.output(3,GPIO.LOW) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A1. Top three recommendation for Raspberry Pi accessories | |
Unicorn hat | |
Pibrella | |
Explorer hat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Automated house building code | |
# Spencer Organ - July 2015 | |
# set up connection to Minecraft | |
import mcpi.minecraft as minecraft | |
import mcpi.block as block | |
mc = minecraft.Minecraft.create() | |
x,y,z = mc.player.getPos() | |
# set an off-set for x and y so you don't end up facing the house |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Automated hospital building code | |
# Spencer Organ - July 2015 | |
# set up connection to Minecraft | |
import mcpi.minecraft as minecraft | |
import mcpi.block as block | |
mc = minecraft.Minecraft.create() | |
x,y,z = mc.player.getPos() | |
# set an off-set for x so you don't end up facing the house and wondering why it goes dark |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import os | |
import dot3k.lcd as lcd | |
import dot3k.backlight as backlight | |
import sys | |
import colorsys | |
lcd.clear() | |
os.system('clear') | |
backlight.rgb(255,0,255) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import flotilla | |
import time | |
client = flotilla.Client( | |
requires={ | |
'one':flotilla.Matrix, | |
'two':flotilla.Light, | |
'eight':flotilla.Number |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sweep | |
// by BARRAGAN <http://barraganstudio.com> | |
// This example code is in the public domain. | |
#include <Servo.h> | |
Servo horizontal; | |
Servo vert; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import flotilla | |
import time | |
client = flotilla.Client( | |
requires={ | |
'one':flotilla.Matrix, | |
'eight':flotilla.Number, | |
'two':flotilla.Weather |
OlderNewer