Go Down

Topic: Can't store the values I get from my temperature in the database. (Read 1 time) previous topic - next topic

tuxduino

#10
Dec 30, 2012, 03:06 am Last Edit: Dec 30, 2012, 03:59 am by tuxduino Reason: 1

Yes I am using com4


Sorry, missed this reply before posting my note about com port discovery...

Nick Gammon

Please do not cross-post. This wastes time and resources as people attempt to answer your question on multiple threads.

Threads merged.

- Moderator

NickPyner

#12
Dec 30, 2012, 07:57 am Last Edit: Dec 30, 2012, 08:04 am by NickPyner Reason: 1

Nick, the OP has a problem with a C# program running on the PC, which gets data from Arduino. There's nothing a sketch can do here... :)


OK. I said

Quote
this might be all you need


which still applies.  And, in this case, the solution actually is in how the Arduino exports the data.  


tuxduino



Nick, the OP has a problem with a C# program running on the PC, which gets data from Arduino. There's nothing a sketch can do here... :)

OK. I said
Quote
this might be all you need

which still applies.  And, in this case, the solution actually is in how the Arduino exports the data.  


The OP error is this (please reread the first post):

Quote
"An unhandled exception of type 'System.InvalidOperationException' occurred in System.dll Additional information: The port is closed."


This happens when the C# program tries to open COM4. At that point, how the data coming from Arduino is formatted is irrelevant.

:)

NickPyner

#14
Dec 31, 2012, 01:32 am Last Edit: Dec 31, 2012, 01:43 am by NickPyner Reason: 1


The OP error is this (please reread the first post):


Not necessarily.

It could be that the OP's real error is that he is taking the wrong approach, trying to re-invent the wheel, and ending up with a square one.  

Needless to say, he has every right to bash his head against a brick wall for the intellectual exercise, but there is no suggestion that that is his intent. The intent could be to actually solve the problem, and the problem is reasonably clear (please re-read the title of the post, large orange letters).  

I have no idea about what OP is trying to do in C# but, as far as this forum is concerned, he is like me, a newbie by definition, and both of us have been faced with the same problem. The principle difference between us is that I can send my temperatures to a database, and he can't.  Hence my post.

Hopefully OP will find it a useful approach, he might even find it a blessed relief........





Go Up