Problem with slaving Arduino to RPI, Tx from only works when GtkTerm is active although Arduino does Rx data
Hello,
GIVEN:
* Arduino slaved to my RPI over the USB cable
* Having a simple led connected to the Arduino and a firmware that does the led make blinky blinky if there is any serial activity going on:
void serialEvent(){
if (Serial.available()) { //makes sure something is ready to be read
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(led, LOW);
delay(1000);
}
}
* On the RX port and the GND port of the Arduino I have an analyzer attached and SALEAE running to listen to the data.
WHEN:
From my RPI:
pi@raspberrypi:~$ echo 1 > /dev/ttyACM0
THEN:
- nothing happends on the Arduino (led does not blink)
- SALEAE recieves as data: 1\n
BUT WHEN:
On RPI GtkTerm is active (configured 9600 baud, 8 databits, 1 stopbit, no parity)
and then I do from a terminal
pi@raspberrypi:~$ echo 1 > /dev/ttyACM0
- LED starts blinking
- SALEAE recieves as data: 1\n
On my RPI I programmed a little JAVA program that also writes a '1\n' to the serial port (configured port /dev/ttyACM0, 9600 baud, 8 databits, 1 stopbit, no parity)
and running this leads to the same result:
without GtkTerm active nothing happends and SALEAE recieves as data: 1\n over the Ardiuno
with GtkTerm active LED starts blinking and SALEAE recieves as data: 1\n over the Ardiuno
I tried running GtkTerm as user pi but same results a above
QUESTION:
Any ideas how to get the led blinking without GtkTerm active ?
This one is driving me crazy for days
|