Robot that currently does nothing

Dependencies:   4DGL-uLCD-SE SDFileSystem ShiftBrite mbed-rtos mbed wave_player Motor

Files at this revision

API Documentation at this revision

Comitter:
CRaslawski
Date:
Thu Mar 16 16:35:43 2017 +0000
Parent:
10:059154e51621
Commit message:
Added bluetooth stubs

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 059154e51621 -r 9d9ab1dfa28a main.cpp
--- a/main.cpp	Thu Mar 16 06:48:56 2017 +0000
+++ b/main.cpp	Thu Mar 16 16:35:43 2017 +0000
@@ -29,6 +29,29 @@
 //Motor Left(p21, p12, p11); //, p6, p5, 1); // pwm, fwd, rev, can brake
 Motor Left(p21, p14, p13);      // green wires. pwm, fwd, rev, add ", 1" for braking
 Motor Right(p22, p12, p11);     // red wires
+
+/*
+//Bluetooth addition
+RawSerial  pc(USBTX, USBRX);
+RawSerial  dev(p9,p10); //tx, rx
+
+void dev_recv()
+{
+    //led1 = !led1;
+    while(dev.readable()) {
+        pc.putc(dev.getc());
+    }
+}
+
+void pc_recv()
+{
+    led4 = !led4;
+    while(pc.readable()) {
+        dev.putc(pc.getc());
+    }
+}
+*/
+
 void LCD_thread1() {
     while(1){    
         mutex.lock();
@@ -116,6 +139,16 @@
 }
 
 int main() {
+    
+    /*
+    //BT stuff
+    pc.baud(9600);
+    dev.baud(9600);
+    pc.attach(&pc_recv, Serial::RxIrq);
+    dev.attach(&dev_recv, Serial::RxIrq);
+    */
+    
+    
     Left.speed(0.0);        //attempt at forcing Left to chill on startup. ineffective.
     Right.speed(0.0);       //Right does not have the issue. Is chill on startup
     //thread1.start(IR_thread); // read in IR data