Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Servo ServoArm mbed
Diff: Headers/Pixy.h
- Revision:
- 0:15a8480061e8
diff -r 000000000000 -r 15a8480061e8 Headers/Pixy.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Headers/Pixy.h Mon May 22 11:24:46 2017 +0000
@@ -0,0 +1,33 @@
+#ifndef PIXY_H
+#define PIXY_H
+#include <mbed.h>
+
+class Pixy
+{
+public:
+ Pixy(Serial& cam);
+
+ struct pixy_s {
+ uint16_t checksum;
+ uint16_t signature;
+ uint16_t x;
+ uint16_t y;
+ uint16_t width;
+ uint16_t height;
+ };
+
+ //returns the X coordinates of the found object in image space
+ int getX();
+ int getY();
+ int getSignature();
+ int getDetects();
+
+private:
+ bool startFound;
+ void rxCallback();
+ int detects;
+ Serial& cam;
+ pixy_s pixy;
+};
+
+#endif
\ No newline at end of file