Skip to content

Instantly share code, notes, and snippets.

@gyaresu
Last active August 20, 2016 04:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gyaresu/88be605b06c371ef6b189dd7146db770 to your computer and use it in GitHub Desktop.
Save gyaresu/88be605b06c371ef6b189dd7146db770 to your computer and use it in GitHub Desktop.
GreatFET Blinky
# This is some blinky code to show Python interaction with Great Scott Gadget's new GreatFET "Azalea"
# http://greatscottgadgets.com/greatfet/
#
# Run the below code from the 'host' directory to imprt greatfet as a module
# https://github.com/dominicgs/GreatFET-experimental/tree/master/host
from greatfet import GreatFET, protocol
from time import sleep
from random import randint
board = GreatFET()
def blinky(times, delay):
for i in range(0, times):
board.vendor_request_out(protocol.vendor_requests.LED_TOGGLE,randint(2,4))
sleep(delay)
blinky(100, 0.1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment