Fwd: Re: C program to write to the com port - RESOLVED

2005-09-09 Thread vittorio
: no newline at end of file Could you please help to straighten things up? Vittorio -- Messaggio inoltrato -- Subject: Re: C program to write to the com port - RESOLVED Date: 02:23, venerdì 09 settembre 2005 From: Paul Hamilton [EMAIL PROTECTED] To: freebsd-questions@freebsd.org

Re: Fwd: Re: C program to write to the com port - RESOLVED

2005-09-09 Thread Giorgos Keramidas
On 2005-09-09 13:53, vittorio [EMAIL PROTECTED] wrote: As a C++ absolute beginner I'm trying to compile your testssc.c file with g++ testssc.c -o testssc (under freebsd 5.4, gcc version 3.4.2) It's not a C++ program. You should use `cc', not `g++'. SerialPort.C: In function `int main(int,

RE: Re: C program to write to the com port - RESOLVED

2005-09-09 Thread Paul Hamilton
57 lines of code. What else have you included? Cheers, Paul -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of vittorio Sent: Friday, 9 September 2005 7:54 PM To: freebsd-questions@freebsd.org Subject: Fwd: Re: C program to write to the com port

Re: Fwd: Re: C program to write to the com port - RESOLVED

2005-09-09 Thread Roland Smith
On Fri, Sep 09, 2005 at 01:53:49PM +0200, vittorio wrote: As a C++ absolute beginner I'm trying to compile your testssc.c file with g++ testssc.c -o testssc (under freebsd 5.4, gcc version 3.4.2) The C and C++ languages are different. Use cc or gcc instead of g++ to compile C code. Roland

Re: Fwd: Re: C program to write to the com port - RESOLVED

2005-09-09 Thread Helge Preuss
vittorio wrote: [...] SerialPort.C: In function `int main(int, char*)': SerialPort.C:62: error: invalid conversion from `unsigned char*' to `char*' SerialPort.C:62: error: initializing argument 1 of `int snprintf(char*, size_t, const char*, ...)' SerialPort.C:66: error: `err' undeclared

Re: C program to write to the com port - RESOLVED

2005-09-08 Thread Paul Hamilton
Hi, Thanks to the patience and persistens of Giorgos, Garret and David, I now have a *sample* program that will transmit 3 bytes of data (mini-ssc protocol), via a serial port to a 8 channel servo controller board. I will continue to develop this as needed. DISCLAIMER: This is being posted

Re: C program to write to the com port - RESOLVED

2005-09-08 Thread Giorgos Keramidas
On 2005-09-09 08:23, Paul Hamilton [EMAIL PROTECTED] wrote: Thanks to the patience and persistens of Giorgos, Garret and David, I now have a *sample* program that will transmit 3 bytes of data (mini-ssc protocol), via a serial port to a 8 channel servo controller board. I will continue to

C program to write to the com port

2005-07-31 Thread Paul Hamilton
Hi, I am trying to write a C program that will send 3 bytes to the cuaa0 com port at 9600 baud, 8n1. I am trying to control a Northlight 8 Channel Servo motor controller: http://home.att.net/~northlightsystems/DMX512toRCservo.htm Most of the code came from this page:

Re: C program to write to the com port

2005-07-31 Thread Giorgos Keramidas
On 2005-07-31 22:50, Paul Hamilton [EMAIL PROTECTED] wrote: Hi, I am trying to write a C program that will send 3 bytes to the cuaa0 com port at 9600 baud, 8n1. I am trying to control a Northlight 8 Channel Servo motor controller: http://home.att.net/~northlightsystems/DMX512toRCservo.htm

Re: C program to write to the com port

2005-07-31 Thread Garrett Cooper
Paul Hamilton wrote: Hi, I am trying to write a C program that will send 3 bytes to the cuaa0 com port at 9600 baud, 8n1. I am trying to control a Northlight 8 Channel Servo motor controller: http://home.att.net/~northlightsystems/DMX512toRCservo.htm Most of the code came from this page:

Re: C program to write to the com port

2005-07-31 Thread David Kelly
On Jul 31, 2005, at 9:50 AM, Paul Hamilton wrote: I am trying to write a C program that will send 3 bytes to the cuaa0 com port at 9600 baud, 8n1. Oddly I found information on how to do that very easy to find for Unix. Conversely wanted to do the same thing in Windows and hit a brick

Re: C program to write to the com port

2005-07-31 Thread Garrett Cooper
Giorgos Keramidas wrote: On 2005-08-01 00:23, Paul Hamilton [EMAIL PROTECTED] wrote: Yes, very full on code ;-) I will see if I can get it to compile! Thanks for that. In the mean time I pondered the endianess thing, and I have tried using my original code to write 1 byte at a time, 3