Created
October 10, 2017 12:53
-
-
Save bennuttall/b9817a94c95fce8f5af5148c83335b12 to your computer and use it in GitHub Desktop.
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 gpiozero import LED | |
from time import sleep | |
led = LED(17) | |
while True: | |
led.on() | |
sleep(1) | |
led.off() | |
sleep(1) |
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 gpiozero import LED | |
led = LED(17) | |
led.blink() |
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 picamera import PiCamera | |
from time import sleep | |
camera = PiCamera() | |
camera.start_preview() | |
sleep(10) | |
camera.capture('/home/pi/image.jpg') | |
camera.stop_preview() |
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 sense_hat import SenseHat | |
sense = SenseHat() | |
while True: | |
r = 255 * sense.humidity / 100 | |
sense.clear(r, 0, 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment