mirror of
https://github.com/thearn/Python-Arduino-Command-API.git
synced 2026-01-09 22:48:03 -05:00
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:
@@ -8,7 +8,7 @@ def Blink(led_pin, baud, port=""):
|
||||
Blinks an LED in 1 sec intervals
|
||||
"""
|
||||
board = Arduino(baud, port=port)
|
||||
board.pinMode(13, "OUTPUT")
|
||||
board.pinMode(led_pin, "OUTPUT")
|
||||
while True:
|
||||
board.digitalWrite(led_pin, "LOW")
|
||||
print board.digitalRead(led_pin) # confirm LOW (0)
|
||||
|
||||
Reference in New Issue
Block a user