Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Nucleo_GPS by
Revision 1:aec45e847ec3, committed 2016-08-16
- Comitter:
- Koob
- Date:
- Tue Aug 16 15:57:35 2016 +0000
- Parent:
- 0:8889ed33c550
- Child:
- 2:ee6862d07ae9
- Commit message:
- Nucleo_GPS_Serial
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Aug 08 02:05:09 2016 +0000
+++ b/main.cpp Tue Aug 16 15:57:35 2016 +0000
@@ -1,9 +1,10 @@
#include "mbed.h"
-
+
+DigitalOut myled(LED1);
Serial gps(D1, D0); // tx, rx
Serial pc(USBTX, USBRX); // tx, rx
-int main() {
+void pc_rx() {
unsigned char c;
int i,rlock;
@@ -54,4 +55,14 @@
}
}//if
}//while
-}//main
\ No newline at end of file
+}
+
+int main(){
+ gps.attach(pc_rx,Serial::RxIrq);
+ while(1) {
+ myled = 1;
+ wait(0.2);
+ myled = 0;
+ wait(0.2);
+ }
+}
\ No newline at end of file
