Arduino input into a C++ program

Mar 8, 2015 at 3:05pm
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.
Mar 9, 2015 at 12:51am
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
Mar 9, 2015 at 5:09am
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.
Mar 9, 2015 at 6:11am
but arent you trying to write the program on ardiuno? if so you wont have access to the headers
Mar 9, 2015 at 9:18am
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.
Mar 9, 2015 at 1:59pm
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.
Mar 9, 2015 at 5:06pm
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.