Prometheus / Pixy

Dependents:   PixyTest PixyTest

Revision:
2:c3a866b20784
Parent:
0:a2603d7fa0ac
--- a/Pixy.h	Fri May 05 12:03:13 2017 +0000
+++ b/Pixy.h	Wed May 17 07:37:43 2017 +0000
@@ -1,13 +1,11 @@
-#ifndef TUIASI_PIXY_H
-#define TUIASI_PIXY_H
+#ifndef PIXY_H
+#define PIXY_H
 
 #include "mbed.h"
-//#include "PixyLinkSPI.h"
 #include "PixyLinkI2C.h"
-//#include "PixyLinkUART.h"
 
 struct Block {
-    void print(Serial &pc) {
+   void print(Serial &pc) {
         pc.printf("sig: %d x: %d y: %d width: %d height: %d\n", signature, x, y, width, height);
     };
     uint16_t signature;
@@ -20,8 +18,7 @@
 class Pixy
 {
 public:
-    enum LinkType {SPI, I2C, UART};
-    Pixy(LinkType linkType, PinName mosi_sda_tx, PinName miso_scl_rx, PinName sclk = NC);
+    Pixy(PinName mosi_sda_tx, PinName miso_scl_rx);
     ~Pixy();
     uint16_t getBlocks(uint16_t maxBlocks=1000);
     int8_t setServos(uint16_t s0, uint16_t s1);
@@ -35,7 +32,7 @@
     static const uint8_t PIXY_MAXIMUM_ARRAYSIZE = 130;
     static const uint16_t PIXY_START_WORD = 0xaa55;
     static const uint16_t PIXY_START_WORDX = 0x55aa;
-    static const uint8_t PIXY_DEFAULT_ADDR = 0x54;  // I2C
+    static const uint8_t PIXY_DEFAULT_ADDR = 0xAC;  // I2C Adresse
 
     bool getStart();
     void resize();
@@ -47,4 +44,4 @@
     PixyLink *m_link;
     Serial *pc;
 };
-#endif //TUIASI_PIXY_H
+#endif //PIXY_H
\ No newline at end of file