Skip to content

Instantly share code, notes, and snippets.

@boxmein
Created April 9, 2016 23:24
Show Gist options
  • Save boxmein/88746631234b7b89ecf6cc9c61f5cd33 to your computer and use it in GitHub Desktop.
Save boxmein/88746631234b7b89ecf6cc9c61f5cd33 to your computer and use it in GitHub Desktop.
#!/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