Arduino input into a C++ program

Okay, so my school assignment is to write two programs: one on an Arduino to pass data from sensors through the serial port to a computer, and one to write that information to a database. My problem is a lack of knowledge of how to feed that information to my program.

Am I able to have the Arduino write a file with a given filename that I can call with the C++ program? Or am I going to have to directly pull the data from the bus?

Thanks in advance for your help.
this belongs in the unix/linux section. it would probably be best to move it so the proper people have a better chance to see it
Well, as I am using a Windows machine to run my program, and would thus have access to Win32/Win64 headers and stuff (like windows.h), it makes sense for me to put it here.
but arent you trying to write the program on ardiuno? if so you wont have access to the headers
Here is one of many serial port tutorials for windows: http://www.codeproject.com/Articles/2682/Serial-Communication-in-Windows

Arduino will send RAW data - ie. byte stream. In what format you send it and then interpret is up to you.
This tutorial will work with USB? And if so, does it say what the name of different USB ports are to the machine?

Again, thanks for your help.
The USB driver which is required to be installed with your Arduino will create a virtual serial port, so the code will still work.
Topic archived. No new replies allowed.