- Netduino Forums
- → ikorsa's Content
The Netduino forums have been replaced by new forums at community.wildernesslabs.co.
This site has been preserved for archival purposes only
and the ability to make new accounts or posts has been turned off.
ikorsa's Content
There have been 4 items by ikorsa (Search limited from 30-March 23)
#10225 Serial port exception
Posted by ikorsa on 26 February 2011 - 12:23 AM in Netduino 2 (and Netduino 1)
Thanks Chris,
1. I'll try this way and let you know.
2. I'm still wondering why it's happend. May be somebody else has a 10 HZ GPS and Netduino to try ?
3. Parsing the NMEA is not big deal, but I do not need it in Netduino( may be I need to setup RTC ),
I need just recieve it and put to the flash and SD. Detail parsing I 'll do on PC. Anyway to use 20 HZ GPS I'll switch to binary
mode, but for debuging it easy to use NMEA...
Igor
#10219 Serial port exception
Posted by ikorsa on 25 February 2011 - 11:02 PM in Netduino 2 (and Netduino 1)
Hi Chris,
I probably solved the problen to put Thread.Sleep(90) in EventHandle procedure.
But problem is
1. I read int bytesToRead = serialPort.BytesToRead; in my post it will NOT 72 for hole RMC line
It look like
- bytesToRead = 25 and I got this $GPRMC,223841.900,V,0000.
bytesToRead = 11 and I got 0000,N,0000
bytesToRead = 10 and 0.0000,E,0
....
Some time bytesToRead = 72 and I got hole correct line $GPRMC......
When I'm using the Hyperterminal - I got correctly all lines
I put Thread.Sleep(90), it help - it reduce "small" lines , but it's happend anyway.
My plan to use the 20 HZ GPS (I'm waiting for hardware), but I'm not sure...
I read some your post that .NET is not for real time programming, but this platform it really reduce a lot of time!
My project is simple datalogger : 20 HZ GPS UART (230400) , 2 channel temperature SPI reading ( 2 cyllinders), Timer for RPM
and 3 axis accelerometer analog or I2C ( I need to try both) micro-SD SPI and AT45DB361D SPI for Flash and Xbee (UART) for communication.
I started on ARM7 (LPC2478) with Keil C... too much head ache for me it is not programming it look more like "know how".
I switch to Arduino - more simple , but most Library that exist - very pure written -
I bought Netduino now, and very happy with other my project with GPRS module and send and recieve SMS with .Net it so simple
and "nicely" to program it! Great!
I hope tha I can able to finish it before may with Netduino.
Thanks
Igor
#9978 Serial port exception
Posted by ikorsa on 21 February 2011 - 11:05 PM in Netduino 2 (and Netduino 1)
sorry forgot to mention firmware 4.1.1 ALPHA7
This is the output data GPS update rate 10Hz (100ms)
$GPRMC,223840.400,V,0000.0000,N,00000.0000,E,000.0,000.0,210211,,,N*7C
$GPRMC,223840.500,V,0000.0000,
N,00000.000
0,E,000.0,
000.0,210211
,,,N*7D
$GPRMC,223840.600,V,0000.0000,N,00000.0000,E,000.0,000.0,210211,,,N*7E
$GPRMC,223840.700,V,0000
.0000,N,000
00.0000,E,
000.0,000.0
,210211,,,N*7
F
$GPRMC,223840.800,V,0000.0000,N,00000.0000,E,000.0,000.0,210211,,,N*70
$GPRMC,223840.900,V,0000.0000,N
,00000.0000
,E,000.0,0
00.0,210211,
,,N*71
$GPRMC,223841.000,V,0000.0000,N,00000.0000,E,000.0,000.0,210211,,,N*79
$GPRMC,223841.100,V,0000
.0000,N,000
00.0000,E,
000.0,000.0,
210211,,,N*78
$GPRMC,223841.200,V,0000.0000,N,00000.0000,E,000.0,000.0,210211,,,N*7B
$GPRMC,223841.300,V,0000.0000,N
,00000.0000
,E,000.0,00
0.0,210211,
,,N*7A
$GPRMC,223841.400,V,0000.0000,N,00000.0000,E,000.0,000.0,210211,,,N*7D
$GPRMC,223841.500,V,0000
.0000,N,00
000.0000,E,
000.0,000.0,
210211,,,N*7C
$GPRMC,223841.600,V,0000.0000,N,00000.0000,E,000.0,000.0,210211,,,N*7F
$GPRMC,223841.700,V,0000.0000
,N,00000.000
0,E,000.0,
000.0,210211
,,,N*7E
$GPRMC,223841.800,V,0000.0000,N,00000.0000,E,000.0,000.0,210211,,,N*71
$GPRMC,223841.900,V,0000.
0000,N,0000
0.0000,E,0
00.0,000.0,2
10211,,,N*70
#9977 Serial port exception
Posted by ikorsa on 21 February 2011 - 10:53 PM in Netduino 2 (and Netduino 1)
I use the same code to read from Serial port, but connection is not reliable. I use 10HZ update rate GPS with 115200 baud rate.
serialPort.bytesToRead show less then 72 (but look like 24+8+.. =72) , the $GPRMC length = 72. some time 2-4 sentence is ok.
It mix together normal $GPRMC sentence and sentence break on a parts.
I have know idea why, when I connect GPS + serial to USB -> computer all ok!even on 230400 baudrate
GPS send only $GPRMC each 100 ms.(nothing else)
The code is the same as above ...
Not enough speed for processor ?
But in my project I have to hookup 20 HZ GPS ?!
Thanks Igor
- Netduino Forums
- → ikorsa's Content
- Privacy Policy