Manchester (England England)
Offline
Brattain Member
Karma: 299
Posts: 26025
Solder is electric glue
|
 |
« Reply #15 on: January 10, 2013, 05:11:38 am » |
that's means it will not read the data into gui?
No it will read data if you send it data and if you write the code correctly.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 39
|
 |
« Reply #16 on: January 10, 2013, 10:50:02 am » |
PaulS, my problem now, the serialport is open..however the data cannnot be uploaded in the WPF? if every function im doing the threading part..is it works to received the data in synchronous manner? im handle the serial port class in one threads and the data in another threads..
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA USA
Online
Brattain Member
Karma: 334
Posts: 36446
Seattle, WA USA
|
 |
« Reply #17 on: January 10, 2013, 03:47:47 pm » |
Did you try running my application? Did you look at how it handles the serial data in one thread and communicates with the GUI thread?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 39
|
 |
« Reply #18 on: January 10, 2013, 07:09:21 pm » |
yes.n i have take a look on the threading..when i click on the button..it says "The port is already open". However there is no data appeared on the WPF.it appeared in the console application and arduino serial monitor but not in the WPF C# application.
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA USA
Online
Brattain Member
Karma: 334
Posts: 36446
Seattle, WA USA
|
 |
« Reply #19 on: January 10, 2013, 07:11:57 pm » |
when i click on the button..it says "The port is already open". However there is no data appeared on the WPF. Are you trying to run my application and the serial monitor at the same time? If my application can't open the serial port, is it any wonder why no serial data appear on the form?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 39
|
 |
« Reply #20 on: January 10, 2013, 07:23:58 pm » |
there's an error " Couldn't find input file"Properties\Resources.resx.what thats mean?
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA USA
Online
Brattain Member
Karma: 334
Posts: 36446
Seattle, WA USA
|
 |
« Reply #21 on: January 10, 2013, 07:28:59 pm » |
there's an error " Couldn't find input file"Properties\Resources.resx.what thats mean? p The file is in the zip file I attached.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 39
|
 |
« Reply #22 on: January 10, 2013, 07:39:45 pm » |
yes.i have extracted the file..
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 39
|
 |
« Reply #23 on: January 12, 2013, 10:49:03 am » |
the result of the code is appeared in the serial monitor of the arduino and on the console application...however the data is not appeared on the windows form? is there any wrong with my code?
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA USA
Online
Brattain Member
Karma: 334
Posts: 36446
Seattle, WA USA
|
 |
« Reply #24 on: January 12, 2013, 11:00:57 am » |
When I click on the zip file, I get: Error 503 Service Unavailable
Service Unavailable Guru Meditation:
XID: 1078454701
Varnish cache server So, if you could please varnish the cache server again, that would be good.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 39
|
 |
« Reply #25 on: January 12, 2013, 12:25:39 pm » |
hi PaulS, attached is my code that will received the arduino data.
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA USA
Online
Brattain Member
Karma: 334
Posts: 36446
Seattle, WA USA
|
 |
« Reply #26 on: January 12, 2013, 12:30:40 pm » |
Can't read them, either. I posted in Website and Forum about the problem. When the new coat of varnish dries, I'll try again.
|
|
|
|
|
Logged
|
|
|
|
|
Indiana
Offline
Jr. Member
Karma: 0
Posts: 56
|
 |
« Reply #27 on: January 18, 2013, 11:41:45 am » |
Let me make sure I understand correctly.
1. Your Arduino is running code outputting data to serial port. 2. You want the data Arduino is sending to serial port to be read into your C# program and displayed on a Windows Form.
I think you have your read and write backwards. You aren't trying to WRITE the output from serial to your C# GUI, you want to READ the output from Arduino, into your C# program and then display it in the GUI.
set a string variable in C# = sp1.readline()
Then set the GUI element ".TEXT" field = to the string variable you created to display it.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Tesla Member
Karma: 58
Posts: 6774
Arduino rocks
|
 |
« Reply #28 on: January 18, 2013, 01:23:17 pm » |
Simple serial monitor test code that sends back what is sent to the arduino. If this works, then the issue is with your pc code. If your pc code opens/closes the pc com port on each write, that will cause the arduino to reset each write. // zoomkat 7-30-11 serial I/O string test // type a string in serial monitor. then send or enter // for IDE 0019 and later
String readString;
void setup() { Serial.begin(9600); Serial.println("serial test 0021"); // so I can keep track of what is loaded }
void loop() {
while (Serial.available()) { delay(2); //delay to allow byte to arrive in input buffer char c = Serial.read(); readString += c; }
if (readString.length() >0) { Serial.println(readString);
readString=""; } }
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 39
|
 |
« Reply #29 on: January 29, 2013, 06:28:31 am » |
you are right ,jjspierx
im just receiving the latitude sent by the transmitter and display on GUI.does the code for dispalying the latlong making any sense?
|
|
|
|
|
Logged
|
|
|
|
|
|