Islam S. M. Khalil / Mbed 2 deprecated template_biorobotics

Dependencies:   mbed QEI HIDScope biquadFilter MODSERIAL FastPWM

Files at this revision

API Documentation at this revision

Comitter:
IslamKhalil
Date:
Mon Sep 09 11:51:38 2019 +0000
Parent:
3:766c85141f33
Commit message:
template biorobotics serial communication without blocking

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
main.cpp.orig Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Sep 09 10:39:34 2019 +0000
+++ b/main.cpp	Mon Sep 09 11:51:38 2019 +0000
@@ -17,7 +17,7 @@
     while (true) {
         
         led = !led ;
-        wait_ms(1000) ;
+        wait_ms(500) ;
         char c ;
         c = pc.getcNb() ;
         pc.putc(c) ;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp.orig	Mon Sep 09 11:51:38 2019 +0000
@@ -0,0 +1,25 @@
+#include "mbed.h"
+#include "HIDScope.h"
+#include "QEI.h"
+#include "MODSERIAL.h"
+#include "BiQuad.h"
+#include "FastPWM.h"
+
+DigitalOut led(LED_BLUE) ;
+DigitalIn sw2(SW2) ;
+MODSERIAL pc(USBTX, USBRX) ;
+
+int main()
+{
+    pc.baud(115200) ;
+    pc.printf("\r\nStarting...\r\n\r\n") ;
+    
+    while (true) {
+        
+        led = !led ;
+        wait_ms(100) ;
+        char c ;
+        c = pc.getcNb() ;
+        pc.putc(c) ;
+    }
+}