k

Dependencies:   Servo ServoArm mbed

Committer:
beacon
Date:
Mon May 22 11:24:46 2017 +0000
Revision:
0:15a8480061e8
o

Who changed what in which revision?

UserRevisionLine numberNew contents of line
beacon 0:15a8480061e8 1 #ifndef PIXY_H
beacon 0:15a8480061e8 2 #define PIXY_H
beacon 0:15a8480061e8 3 #include <mbed.h>
beacon 0:15a8480061e8 4
beacon 0:15a8480061e8 5 class Pixy
beacon 0:15a8480061e8 6 {
beacon 0:15a8480061e8 7 public:
beacon 0:15a8480061e8 8 Pixy(Serial& cam);
beacon 0:15a8480061e8 9
beacon 0:15a8480061e8 10 struct pixy_s {
beacon 0:15a8480061e8 11 uint16_t checksum;
beacon 0:15a8480061e8 12 uint16_t signature;
beacon 0:15a8480061e8 13 uint16_t x;
beacon 0:15a8480061e8 14 uint16_t y;
beacon 0:15a8480061e8 15 uint16_t width;
beacon 0:15a8480061e8 16 uint16_t height;
beacon 0:15a8480061e8 17 };
beacon 0:15a8480061e8 18
beacon 0:15a8480061e8 19 //returns the X coordinates of the found object in image space
beacon 0:15a8480061e8 20 int getX();
beacon 0:15a8480061e8 21 int getY();
beacon 0:15a8480061e8 22 int getSignature();
beacon 0:15a8480061e8 23 int getDetects();
beacon 0:15a8480061e8 24
beacon 0:15a8480061e8 25 private:
beacon 0:15a8480061e8 26 bool startFound;
beacon 0:15a8480061e8 27 void rxCallback();
beacon 0:15a8480061e8 28 int detects;
beacon 0:15a8480061e8 29 Serial& cam;
beacon 0:15a8480061e8 30 pixy_s pixy;
beacon 0:15a8480061e8 31 };
beacon 0:15a8480061e8 32
beacon 0:15a8480061e8 33 #endif