Thread: Serial Communication Code for Reading

  1. #1
    Registered User
    Join Date
    Apr 2010
    Posts
    9

    Serial Communication Code for Reading

    Hi, does anyone has any simple C++ code to read data from serial port? I'm doing a project to receive a temperature reading for every 5 seconds from the serial port, so it shouldn't be any complicated code needed to be implemented for data queue up function.

    I've already searched through google for the code but it is either too complicated, too long to understand or has problem in compilation. So kindly ask for your help here. Thanks!

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Well we would need to know your OS and compiler to stand a chance of answering that.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Apr 2010
    Posts
    9
    I'm using Windows Vista and Microsoft Visual Studio 6.0. I have just found one Serial source file, but just doesn't know how to start my program.
    Last edited by coolrox86; 04-24-2010 at 11:42 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  2. Serial communication packets
    By Roaring_Tiger in forum C Programming
    Replies: 3
    Last Post: 04-26-2003, 08:33 AM
  3. True ASM vs. Fake ASM ????
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 04-02-2003, 04:28 AM
  4. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM
  5. Need help or info about serial port communication
    By Unregistered in forum Linux Programming
    Replies: 1
    Last Post: 01-08-2002, 01:48 PM