Pages: [1]   Go Down
Author Topic: Can only get Arduino Uno output on Arduino IDE  (Read 330 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello everyone

I'm measuring some data with my Arduino Uno and I want to send those data to my PC, which is running Lubuntu as its OS, so that I can work with them.

I can receive the data through the Serial Monitor build in the Arduino IDE and they are shown just the way I want.
When I try to get the data through the Terminal I cannot receive any of them.

I tried the following commands:
1)
Simply using
Code:
cat /dev/ttyACM0
2)
Code:
cat /dev/ttyACM0 | awk '{ for (i=0; i<NF; i++) printf $i + system("date +,%s")}'
3)
Code:
stty -F /dev/ttyACM0  cs8 9600 ignbrk -brkint -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts
tail -f /dev/ttyACM0


I searched the web nearly a whole day but couldn't find any solution which worked for me.
Logged

UK
Offline Offline
Tesla Member
***
Karma: 124
Posts: 7129
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I suspect you are facing a problem because opening the serial port causes the Arduino to reset.

If you wrote a special program (using Python, for example) to gather the data you would build in a process to wait until the Arduino had gone through its reset process.

Some of the other serial terminal programs (perhaps PuTTY) have the ability to save stuff to a file.

...R
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

After some further searching I found the program screen or rather the command how I can connect to my port.

Code:
screen <serial_port> <baud_rate>
screen /dev/ttyACM0 9600

Then were my data shown and I could save those with the key combination 'Ctrl-A' and then 'H' into a file ( log-file ).
If I understood correctly there also is the possibility to save all the information which was shown until the moment you type the following commands into a file:
You have to be inside screen and then type 'Ctrl-A' and then ' : ' and then you have to type 'hardcode -h <filename>' where <filename> the name of the file is in which everything will be saved.

I also tried PuTTY but couldn't connect to my port. I have to say that I tried it just two times because at that time screen already worked.
Maybe someone can help me with PuTTY. I would like to know how it works with it, too.
Logged

Pages: [1]   Go Up
Jump to: