This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
code:nmea_collection [2009/03/26 22:24] joshatkins deleting page (just experimental) |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== NMEA collection (Arduino code) ====== | ||
- | |||
- | void setup() { | ||
- | Serial.begin(9600); // Initialize the serial connection | ||
- | } | ||
- | |||
- | void loop() { | ||
- | if(Serial.available()>0) { | ||
- | int nmea = Serial.read(); | ||
- | if(nmea==0) { | ||
- | Serial.print(nmea); | ||
- | } | ||
- | else { | ||
- | Serial.print(nmea, BYTE); | ||
- | } | ||
- | Serial.println(); | ||
- | } | ||
- | } | ||
- | |||