I have a question regarding serial communication. I'm sending data serially from raspberry pi to arduino to turn on and off LEDs (using python). When I'm using my PC it works great; however, when I'm using raspberry pi, I need to open the serial monitor to make it work.
Any idea why this is happening?
Might (no idea what else is connected) but does not explain anything with the Serial Monitor.
But can you explain what I say in reply #3? How is it possible for the Python script to work if you open the Serial monitor if Python isn't able to connect to the Serial port as long as the Serial monitor is open?
septillion:
Might (no idea what else is connected) but does not explain anything with the Serial Monitor.
But can you explain what I say in reply #3? How is it possible for the Python script to work if you open the Serial monitor if Python isn't able to connect to the Serial port as long as the Serial monitor is open?
So basically what I did is that I run the Python script, then I open the Serial monitor. At first is says that I can't open it since the PORT is not selected even-though I've already uploaded the program. so I go and select the port again and it works.
Mega2560, and it worked. Apparently it's a power issue. The raspberry pi isn't supplying enough current to the Arduino I guess. I connected a 5V battery to the Vin and GND of the arduino and that solved it.