not able to send incomingBytes to my Arduino Mega 2560 from my terminal [antegros linux 64 bit]
I'm running antegros linux on my desktop computer and am working on my arduino mega 2560 board through the serial port.
I have my arduino board programmed to where start a sequence when it recieves the incomingByte 'r'. when I send the 'r' via "serial monitor" tool on the arduino IDE program it works fine.
If I run the following command through my terminal nothing happens.
echo r > /dev/ttyACM0
But when I run
sudo echo r > /dev/ttyACM0
it works only the first time (even after I reset my arduino). I have to restart the computer for the command to work again.
I'm stuck I need to fix it to where it works with out the sudo for a script.