Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
A simple client that communicates with an arduino item via Serial monitor. Expect to find the code here when it goes public:
from importlib import import_module
import os
import time
import arduinosensor
def main():
# open defined client
start_time = time.time()
while True:
reading = arduinosensor.get_values(os.environ.get('PORT', "/dev/ttyUSB0"))"python_client", payload=reading)
time.sleep(10.0 - ((time.time() - start_time) % 10.0))
if __name__ == "__main__":
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment