Go Down

Topic: cannot read the data from arduino to the c# (Read 10576 times) previous topic - next topic


At a quick glance it looks ok to me, is it working?


it is not working for serial part..n the latlong transmitted cannot be displayed in the label in c# winform.


this is my snippet of coding for arduino..
Code: [Select]
float rate, waterlevel,longitude,latitude;
...if (latitude== 3.8463 && longitude==103.3059)

why i cannot pun the value of latitude and longitude into the label on the winform?


Without seeing your C# code or a more detailed description of the problem,  I cannot help you as I do not understand what the problem is.


why i cannot pun the value of latitude and longitude into the label on the winform?

You can, if you do it right. Are you (properly) using separate threads for the serial and UI activities?


There are some examples on stackexchange and perhaps also on the arduino forum. That being said, I attached a small project with a multiline textbox that receives messages from the serial interface (as well as a dropdown to select and connect with the proper COM) It should be easily modifiable for your purposes.


how to seperate the the thread from UI, PaulS?sorry for asking as im new in c#...from the search in the tutorial, it seems that i have to use the backgroundworker code..how i use that in proper manner?


I've attached a C# application that communicates with the Arduino, using separate threads for the UI and the serial data handling.

It should give you some clues.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131