ECE12
Newbie level 4
I'm interfacing the Arduino uC with Visual Basic. I can read in the serial data from the uC w/ Visual Basic just fine, and then I write these values into a text file. I try to read in the text file values using a C++ program, but it doesn't read in the values correctly. In C++ I'm trying to read in the values as INT's but I think when I'm writing the values to a file in VB, it is converting it to something other than ints. I don't think its type is a string either, because when I try to read in a string it has a couple of junk characters prior to the actual string of text.
It's strange, because while looking at the text file using Notepad that I generated in VB, it appears to look just how I want it to. Do you have any experience with this sort of thing?
The arduino uC is outputting DEC values which the VB program reads. I store the input values into a label, and then I write the label text to a file. So is the values in the created .txt non integer values? I'm pretty sure this is the problem, but I don't know a good way of generating the text file correctly when I need to be able to append a space between each integer value, so I can differentiate between them when I start to read them into my C++ program.
---------- Post added at 02:15 ---------- Previous post was at 00:26 ----------
Okay. Let me explain myself better.
In VB 2010 I write to a text file 'A'. I open the file in notepad, and sure enough the 'A' is there. As you would expect. Now, when I try to read the file in C++ it reads in the A as some weird symbol character. Can anyone explain that to me?
It's strange, because while looking at the text file using Notepad that I generated in VB, it appears to look just how I want it to. Do you have any experience with this sort of thing?
The arduino uC is outputting DEC values which the VB program reads. I store the input values into a label, and then I write the label text to a file. So is the values in the created .txt non integer values? I'm pretty sure this is the problem, but I don't know a good way of generating the text file correctly when I need to be able to append a space between each integer value, so I can differentiate between them when I start to read them into my C++ program.
---------- Post added at 02:15 ---------- Previous post was at 00:26 ----------
Okay. Let me explain myself better.
In VB 2010 I write to a text file 'A'. I open the file in notepad, and sure enough the 'A' is there. As you would expect. Now, when I try to read the file in C++ it reads in the A as some weird symbol character. Can anyone explain that to me?