SophieLiu wrote: ↑Fri Aug 23, 2019 7:47 pm
I want to control NeoPixel LED lights with Raspberry pi. The lights are connected with Arduino. When I just check the arduino through my own laptop, the outputs are stable. However, when arduino is connected with Raspberry pi, the code can run for two times (I write while loop for the light) and then arduino changes the Serial Port automatically. I want to know why it will change automatically since I don't touch or move anything so I don't think it's the contact problem. Thanks.
Puzzling problem. First off, are you using the latest Arduino update or the outdated one from the Raspbian repositories? You should probably download and install the latest version (1.8.9 as of this writing) from the Arduino web site if you have not done so already. Second, have you actually selected ttyACM0 (linux IDE) from the "Tools" menu in the Arduino IDE? Finally, is there anything in your code loop that will close the serial port? Dumb questions that may or may not help as I am pretty new with the Arduino myself.
Oh, is the IDE running on your RPi (model?) or on another computer/OS such as Windows? And what language are you using...Arduino modified C from the IDE or something else? More dumb questions.