Created
April 9, 2016 23:24
-
-
Save boxmein/88746631234b7b89ecf6cc9c61f5cd33 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 time | |
import RPi.GPIO as GPIO | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(17, GPIO.OUT) | |
# wish it was that easy with people ;) | |
def turn_led_on(): | |
GPIO.output(17, 1) | |
def turn_led_off(): | |
GPIO.output(17, 0) | |
# Todo: | |
# make a function morse(message) that takes text "Hello, world" | |
# and outputs morse code by blinking the leds and waiting | |
# wait with time.sleep(seconds) | |
# 1 dot = 0.1 seconds? | |
# dash is 3 dots long | |
# empty space between letters is 1 dot long | |
# empty space between words is 7 dots long | |
# your code goes here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment