LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 05-28-2019, 01:43 AM   #1
Ronnie76
LQ Newbie
 
Registered: May 2019
Posts: 2

Rep: Reputation: Disabled
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending serial information over USB from RPI to Arduino only works if GtkTerm is active Ronnie76 Linux - Embedded & Single-board computer 1 05-29-2019 11:21 AM
Issue - zrep slaving bigger than master RayLui20 Solaris / OpenSolaris 0 01-25-2017 10:47 PM
LXer: Mini-PC taps RPi Compute Module and supports RPi 2 LXer Syndicated Linux News 0 02-22-2015 03:03 PM
Cent OS: Slaving Possibly Bad HDD mellomutt Linux - Hardware 2 12-03-2008 06:20 PM
Slaving my old machine brandon14u2 Ubuntu 1 10-22-2005 06:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 08:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration