You are not logged in.

#1 2009-12-31 01:30:47

action_owl
Member
From: WWW, The Internet 127.0.0.1
Registered: 2009-08-15
Posts: 73

Read Serial Data with BASH

I have a device(Arduino) that is sending out data via serial(dev/ttyUSB0) how can I read this data with a bash script?
What commands might I use to view the output?

thanks

Offline

#2 2009-12-31 12:32:59

tlvb
Member
From: Sweden
Registered: 2008-10-06
Posts: 297
Website

Re: Read Serial Data with BASH

Depending on the baud rate and such you might be able to
# cat /dev/ttyUSB0
i.e. use the file as any input file.
(I've done that with a serial->usb converter)

Last edited by tlvb (2009-12-31 12:33:38)


I need a sorted list of all random numbers, so that I can retrieve a suitable one later with a binary search instead of having to iterate through the generation process every time.

Offline

#3 2009-12-31 15:50:50

Grazz256
Member
Registered: 2009-06-28
Posts: 69

Re: Read Serial Data with BASH

Do you need to use bash? What end result are you trying to achieve?

I have a couple of little apps that process serial data, I can modify one for you if you would like.
Just let me know what you want it to do..

Offline

#4 2010-01-16 02:33:04

action_owl
Member
From: WWW, The Internet 127.0.0.1
Registered: 2009-08-15
Posts: 73

Re: Read Serial Data with BASH

I was doing something with serial data coming from an arduino and was having to use processing which was unecessary overhead

Offline

#5 2010-01-16 03:22:05

Grazz256
Member
Registered: 2009-06-28
Posts: 69

Re: Read Serial Data with BASH

Generally what I do is write a quick app in c to read the serial data, process it, and report anything I need.
If I don't need to process it and just want to see the results I have a minicom type app I wrote (jcomm) that
I use to send/recv data for use with AVRs.

Offline

Board footer

Powered by FluxBB