Skip to content

Commit b1f6ba9

Browse files
committed
Added blink example
1 parent 56d967c commit b1f6ba9

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

blink.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
from acmepins import GPIO
2+
from time import sleep
3+
import sys
4+
5+
print "This is the name of the script: ", sys.argv[0]
6+
print "Number of arguments: ", len(sys.argv)
7+
print "The arguments are: " , str(sys.argv)
8+
9+
#Roadrunner example
10+
led = GPIO(sys.argv[1],'OUTPUT')
11+
12+
while True:
13+
led.on()
14+
sleep(1)
15+
led.off()
16+
sleep(1)

0 commit comments

Comments
 (0)