When the Raspberry pi boots up, it looks for the Arduino connected serially. I have a udev rules that finds the USB port Arduino is connected. This works just fine. In the program I am bit-banging GPIO lines with AVRDUDE into AtTiny84A. Right when power is applied to AtTiny, the com port changes for the Arduino and throws the serial exception errors. I have tried to handle the exception by finding the new com port the arduino was assigned to, but the exception always kills the program. I am using PySerial as well.

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.

from time import sleep
import time
import subprocess
import serial
import os

ser = serial.Serial('/dev/serial_friend',115200, timeout=.1)

while True:
    data1 = ser.read()
    print("Waiting to Program...")
    if data1 == "1":

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?) :

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.