pixy

Dependencies:   mbed

Revision:
0:fc7c5285fa79
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Gimbal_PixyTest.cpp	Thu Oct 25 03:57:08 2018 +0000
@@ -0,0 +1,35 @@
+#include "mbed.h"
+#include "PinAssign.h"
+#include "GlobalVariables.h"
+#include "PixyData.h"
+
+Ticker DebugTimer;
+
+bool fDebugTimer=0;
+
+void DebugTimer_isr(void)
+{
+    fDebugTimer=1;
+}
+
+int main() 
+{
+    pc.baud(115200);
+    pixy.baud(115200);
+    
+    DebugTimer.attach(&DebugTimer_isr,0.5);
+    
+    pc.printf("Start\n");
+    while(1) 
+    {
+        //if(pc.readable()) pixy.putc(pc.getc());
+        //if(pixy.readable()) pc.putc(pixy.getc());
+        
+        if(pixy.readable()) PixyData();
+        if(fDebugTimer==1)
+        {
+           // pc.printf("sigN:%d xObs:%d yObs:%d widthObs:%d heightObs:%d\n",PixyChks, SigNum, XObs, YObs, WidObs, HeiObs);
+            fDebugTimer=0;
+        }
+    }
+}