Author Topic: Using C:B to program/use com port  (Read 5865 times)

techone

  • Guest
Using C:B to program/use com port
« on: October 28, 2011, 03:28:01 am »
I guys;

I am trying to use CB to use a serial port.  The part that I don't know is : what header file to use ( inside the CB lib/include files ).

Here what I planning to do : A program in C++ to send the contain of a file to the Arduino ( connect to Port 7 / via USB ). To test the program, I will use COM1 or COM2 to send those data to a terminal program to see if it work. I want to use my program in  Console  Mode.

I did look around with this -->http://www.codeproject.com/KB/system/serial.aspx Try the Serial.h and.... NO compile. NADA, Rien.... I having a lot of ???... and  :x  I don't know what header file I need to make a serial com to compile & work.   

Any help will be appreaciated.

About my programing skills: they are so, so. Kind of beginer and intermediate.  I am using C++ as a hobby and others hobbies. So this is not for school/college/university.   

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Using C:B to program/use com port
« Reply #1 on: October 28, 2011, 03:48:29 am »
You should respect our forum rules. :D
CB is only an IDE, and your question is totally no related to C::B. You can ask your question in a programming language forum.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.