zhaw_st16b_pes2_10 / Mbed 2 deprecated Pixy

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Pixy.h Source File

Pixy.h

00001 
00002 #include <mbed.h>
00003 
00004 class Pixy
00005 {
00006 public:
00007     Pixy(Serial& cam);
00008     
00009     struct pixy_s {
00010         uint16_t checksum;
00011         uint16_t signature;
00012         uint16_t x;
00013         uint16_t y;
00014         uint16_t width;
00015         uint16_t height;
00016     };
00017 
00018     //returns the X coordinates of the found object in image space
00019     int getX();
00020     int getY();
00021     int getSignature();
00022 
00023 private:
00024     bool startFound;
00025     void rxCallback();
00026     Serial& cam;
00027     pixy_s pixy;
00028 };