First off, can I state, I don't know if this is an Arduino problem or a RPi problem, I originally posted this on the Raspberry Pi forums, but am cross-posting here for good measure.
I am currently building a cricket scoreboard, which the RPi sends a signal via USB to the Arduino from a webpage input, I have the Arduino IDE installed on the RPi and when the power is reset to everything, the baud rate of /dev/ttyACM0 gets reset to 9600 baud, but everything I've read says the default baud rate should be 115,200, the sketch on the Arduino has Serial.begin(115200); in its setup, so that should override it anyway I'd have thought.
Soon as the RPi is booted, I get the following:
pi@scoreboard:~ $ stty -F /dev/ttyACM0
speed 9600 baud; line = 0;
-brkint -imaxbel
If I then open the Arduino IDE (v2.1.0) and go straight to the Serial Monitor, I get
pi@scoreboard:~ $ stty -F /dev/ttyACM0
speed 115200 baud; line = 0;
min = 0; time = 0;
-brkint -icrnl -imaxbel
-opost -onlcr
-isig -icanon -iexten -echo -echoe -echok -echoctl -echoke
and the scoreboard will then work until the next reboot.
I have added init_uart_baud=115200 into /boot/config.txt to see if that helped, it didn't (and it was stated to me the USB serial isn't a uart, so my command has no effect), can someone else suggest what could be happening please, and how to remedy it ?
Thanks.