mbed pixy integration

Dependencies:   mbed pixy

Dependents:   aUtO_volume aUtO_volume_v2 aUtO_volume_v3 aUtO_volume_v4 ... more

Files at this revision

API Documentation at this revision

Comitter:
jfields
Date:
Wed Nov 18 21:03:06 2015 +0000
Commit message:
mbed pixy code

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
pixy.lib Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 6618ecb9567e main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Nov 18 21:03:06 2015 +0000
@@ -0,0 +1,29 @@
+#include "mbed.h"
+#include "Pixy.h"
+
+Pixy pixy(Pixy::SPI, p11, p12, p13);
+Serial pc(USBTX, USBRX);
+
+int main() {
+    pc.printf("ready\n\r");
+    pixy.setSerialOutput(&pc);
+    while (1) {
+        static int i = 0;
+        int j;
+        uint16_t blocks;
+  
+        blocks = pixy.getBlocks();
+  
+        if (blocks) {
+            i++;
+    
+            if (i % 50 == 0) {
+                pc.printf("Detected %d:\n\r", blocks);
+                for (j = 0; j < blocks; j++) {
+                    pc.printf("  block %d: ", j);
+                    pixy.blocks[j].print(pc);
+                }
+            }
+        }
+    } 
+}
diff -r 000000000000 -r 6618ecb9567e mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Nov 18 21:03:06 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/9296ab0bfc11
\ No newline at end of file
diff -r 000000000000 -r 6618ecb9567e pixy.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixy.lib	Wed Nov 18 21:03:06 2015 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/acracan/code/pixy/#ed8dc4531ac1