Update examples.py

changed line 11
board.pinMode(13, "OUTPUT")
to
board.pinMode(led_pin, "OUTPUT")
as if led_pin is anything other than 13 the example wont work
This commit is contained in:
Jules Gantenbein
2014-10-22 22:22:32 +11:00
parent eaf55e47dc
commit f2c9de7eb6

View File

@@ -8,7 +8,7 @@ def Blink(led_pin, baud, port=""):
Blinks an LED in 1 sec intervals Blinks an LED in 1 sec intervals
""" """
board = Arduino(baud, port=port) board = Arduino(baud, port=port)
board.pinMode(13, "OUTPUT") board.pinMode(led_pin, "OUTPUT")
while True: while True:
board.digitalWrite(led_pin, "LOW") board.digitalWrite(led_pin, "LOW")
print board.digitalRead(led_pin) # confirm LOW (0) print board.digitalRead(led_pin) # confirm LOW (0)