View topic - Serial port input

Serial port input

anything that doesn't fit to other groups.

Serial port input

Postby rldchua » Thu Dec 11, 2003 5:51 am

I'll like to find out if it's suitable for me to store the input from a serial port to a buffer or to another files(the input are continuous). If the input are to be stored in another file, how can i go about writing the commands???

Hope to hear from someone soon.
New Member
Posts: 7
Joined: Thu Dec 11, 2003 5:48 am

Postby mario » Thu Dec 11, 2003 5:20 pm

Hum, sorry but I don't quite understand what is it you want to do? Are you looking to write a program or perform this task via shell/script?
QNX Master
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

Postby rldchua » Fri Dec 12, 2003 1:21 am

I'm trying to get the input of a sensor and want to read the collected inputs. So actually how should i go about reading the collected values?
New Member
Posts: 7
Joined: Thu Dec 11, 2003 5:48 am

Postby noc » Sat Dec 13, 2003 6:02 pm

You might want to take a look at the QNX DDK source code.
Senior Member
Posts: 1634
Joined: Sat Jul 06, 2002 4:34 am

Postby rick » Sun Dec 14, 2003 2:50 pm

Assuming you can talk to your sensor through the serial port, it is pretty easy to talk to the serial port. You can simply open() or fopen() the port, read() or fread() the data, then either write it to a file, or keep it in memory as appropriate.

All in all, we need more info to provide you with a more specific answer.
QNX Master
Posts: 500
Joined: Wed Nov 13, 2002 3:59 am

Return to General Programming

Who is online

Users browsing this forum: No registered users and 1 guest