Rosserial connection doesn't work due to signal
Hi all,
I have an arduino MEGA and I want to communicate via rosserial with my ros node.
Somewhere in my arduino code I have the following line.
if(intensity[n] <= myCounter)
{
digitalWrite((2*(n-8))+shiftSaidaInicial, LOW);
}
When I try to make the connection running rosrun rosserial_python serial_node.py /dev/ttyACM0
it says that it's unnable to conenct to the device.
However, if I change the previous line to the following it syncs perfectly.
if(intensity[n] >= myCounter)
{
digitalWrite((2*(n-8))+shiftSaidaInicial, LOW);
}
The only thing I changed was the <= to >=. Sadly, so the code makes sense, I need the <= instead..
Anyone knows why this is happening?
Thanks!
I'm not an Arduino expert, but does it use pin-multiplexing for the serial and the DOUT? If so, your first version may be messing with some of the pins needed for your serial connection.