This is some awesome robot code

Dependencies:   mbed-rtos mbed QEI

Fork of ICRSEurobot13 by Thomas Branch

Files at this revision

API Documentation at this revision

Comitter:
madcowswe
Date:
Mon Apr 15 10:52:36 2013 +0000
Parent:
70:0da6ca845762
Child:
72:7996aa8286ae
Commit message:
Main start cord contraption sends signal 0x2 to ai thread when its time to go

Changed in this revision

Processes/Printing/Printing.h Show annotated file Show diff for this revision Revisions of this file
globals.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Processes/Printing/Printing.h	Sun Apr 14 22:02:21 2013 +0000
+++ b/Processes/Printing/Printing.h	Mon Apr 15 10:52:36 2013 +0000
@@ -1,7 +1,7 @@
 
 // Eurobot13 Printing.h
 
-#define PRINTINGOFF
+//#define PRINTINGOFF
 
 #include "mbed.h"
 #include "rtos.h"
--- a/globals.h	Sun Apr 14 22:02:21 2013 +0000
+++ b/globals.h	Mon Apr 15 10:52:36 2013 +0000
@@ -80,6 +80,8 @@
 const PinName P_COLOR_SENSOR_RED_LOWER = p11;
 const PinName P_COLOR_SENSOR_BLUE_LOWER = p10;
 
+const PinName P_START_CORD = p27;
+
 
 
 //a type which is a pointer to a rtos thread function
--- a/main.cpp	Sun Apr 14 22:02:21 2013 +0000
+++ b/main.cpp	Mon Apr 15 10:52:36 2013 +0000
@@ -81,7 +81,13 @@
     motion_timer.start(50);
 
     Thread printingThread(Printing::printingloop, NULL, osPriorityLow, 2048);
-
+    
+    DigitalIn startcord(P_START_CORD);
+    startcord.mode(PullUp);
+    while(!startcord)
+        Thread::wait(50);
+    aithread.signal_set(0x2); //Tell AI thread that its time to go
+    
     measureCPUidle(); //repurpose thread for idle measurement
     /*
     MotorControl::set_omegacmd(0);