Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys, os, serial, threading
- counter = 0
- def monitor():
- ser = serial.Serial(COMPORT, BAUDRATE, timeout=0)
- while (1):
- line = ser.readline()
- if (line != ""):
- print line[:-1]
- ser.write("3983853673620123")
- ser.write(counter%10)
- ser.write('\n')
- counter+=1
- print "Stop Monitoring"
- """ -------------------------------------------
- MAIN APPLICATION
- """
- print "Start Serial Monitor"
- print
- COMPORT = 11; #this is the serial port, normally it's what it's in the arduino +1 so com0 on arduino would be comport 1 here.
- BAUDRATE = 115200
- monitor()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement