Any ideas on how to find the arduino com port at the very beginning of the program and have the OS tie the arduino to that port always so that it can never change?
In the code below, "LaserWrite1" is a batch script that does the bitbanging of the AtTiny.
Error Message: 'device reports readiness to read but returned no data ' SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?) :
Code: Select all
from time import sleep import time import subprocess import serial import os ser = serial.Serial('/dev/serial_friend',115200, timeout=.1) time.sleep(1.0) ser.write("ready") ..... ..... proc1 = subprocess.Popen('Laser_file1', shell = True) proc2 = subprocess.Popen('Laser_file2', shell = True) while True: sleep(0.5) data1 = ser.read() print("Waiting to Program...") if data1 == "1": program_func1()