mirror of
https://github.com/thearn/Python-Arduino-Command-API.git
synced 2026-01-10 23:18:08 -05:00
@@ -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, "INPUT")
|
||||
board.pinMode(13, "OUTPUT")
|
||||
while True:
|
||||
board.digitalWrite(led_pin, "LOW")
|
||||
print board.digitalRead(led_pin) # confirm LOW (0)
|
||||
@@ -73,4 +73,4 @@ def LCD(tx, baud, ssbaud, message, port=""):
|
||||
board.SoftwareSerial.write(" test ")
|
||||
|
||||
if __name__ == "__main__":
|
||||
Blink(13, '9600', port="/dev/tty.usbserial-A700e08i")
|
||||
Blink(13, '9600')
|
||||
|
||||
Reference in New Issue
Block a user