mirror of
https://github.com/thearn/Python-Arduino-Command-API.git
synced 2026-04-24 03:00:20 -04: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
|
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user