Arduino not connected on raspberry pi reboot

I use an Arduino Leonardo to power my dc motors and the direction for motors is given by a raspberry pi 3B+. Everything works fine, but i have to load the code to Arduino or reset the arduino every time I restart the pi.
A week ago, with a differed sd card in the pi,it was working perfectly and this reset/reload on ever reboot wasnt required, i changed the sd card and its not working anymore.
Is it a configuration problem? i have rules set up for static usb. Please help

I do so hope you mean "control my DC motors"

Please post your Arduino code, although to be honest i the only thing that you changed was the SD card in the Pi it sounds like you have a problem that end

The easier you make it to read and copy your code the more likely it is that you will get help

Please follow the advice given in the link below when posting code , use code tags and post the code here

If you get errors when compiling please copy them from the IDE using the "Copy error messages" button and paste the clipboard here in code tags

@niki1999, your topic has been moved to a more suitable location on the forum.

No errors, it just freeze. I can still read, but i cannot write. If i upload the script again, it works fine, until next shutdown

Yes, i mean control, my bad

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.