Created
March 27, 2018 23:35
-
-
Save omiq/acc7c7db89bba6251e9beb40cbe1f5c7 to your computer and use it in GitHub Desktop.
Example of sending strings to Arduino over USB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import serial | |
import time | |
from datetime import datetime | |
print("Starting ...") | |
# change the port to whichever shows in Arduino | |
tardis = serial.Serial('/dev/ttyACM0', baudrate=9600) | |
while(1): | |
tardis.write(str(datetime.now()).encode()) | |
time.sleep(10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment