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.
Dependents: TestPixy FRC_2018 FRC2018_Bis 0hackton_08_06_18 ... more
Fork of Pixy by
PIXY Class Reference
Pixy : CMU CAM 5 - Smart camera More informations at http://cmucam.org/projects/cmucam5. More...
#include <Pixy.h>
Public Member Functions | |
| PIXY (PinName tx, PinName rx, int debit=230400) | |
| Constructor of pixy object. | |
| int | detectedObject (int *nbNM, int *nbCC) |
| Return the number of objects (normal and ColorCode) that have been received from the PIXY and stored in the FIFO during the last frame. | |
| T_pixyCCBloc | getCCBloc (void) |
| Reads the oldest Color Code object from the last frame received. | |
| T_pixyNMBloc | getNMBloc (void) |
| Reads the oldest Normal object from the last frame received. | |
| void | setBrightness (Byte brightness) |
| Set the Brightness of the Pixy. | |
| int | checkNewImage (void) |
| Gives information about a new image taken by Pixy. | |
| int | checkPixy (void) |
| Gives information about a detected Pixy. | |
Data Fields | |
| T_pixyCCData | Pixy_CCFIFO [CC_MAXOBJECT] |
| Direct access to the CC FIFO. | |
| T_pixyNMData | Pixy_NMFIFO [NM_MAXOBJECT] |
| Direct access to the NM FIFO. | |
| Byte | Pixy_CCObjet |
| is the number of CC object read by the library ISR from the CAM during the last frame | |
| Byte | Pixy_NMObjet |
| is the number of normal object read by the library ISR from the CAM during the last frame | |
| int | FlagPixy |
| A new frame as been read. | |
| int | FlagPixyOverflow |
| Data have been lost. | |
Detailed Description
Pixy : CMU CAM 5 - Smart camera More informations at http://cmucam.org/projects/cmucam5.
Definition at line 140 of file Pixy.h.
Constructor & Destructor Documentation
| PIXY | ( | PinName | tx, |
| PinName | rx, | ||
| int | debit = 230400 |
||
| ) |
Member Function Documentation
| int checkNewImage | ( | void | ) |
| int checkPixy | ( | void | ) |
| int detectedObject | ( | int * | nbNM, |
| int * | nbCC | ||
| ) |
Return the number of objects (normal and ColorCode) that have been received from the PIXY and stored in the FIFO during the last frame.
- Parameters:
-
nbNM (int - passed by reference) : number of normal object detected nbCC (int - passed by reference) : number of color code object detected
- Returns:
- 0 if sucessfull, -1 if no PIXY is talking, -2 sucessfull but object(s) have been lost from previous frames (missed frame) or from actual (too many objects)
| T_pixyCCBloc getCCBloc | ( | void | ) |
| T_pixyNMBloc getNMBloc | ( | void | ) |
| void setBrightness | ( | Byte | brightness ) |
Field Documentation
| Pixy_CCFIFO[CC_MAXOBJECT] |
Direct access to the CC FIFO.
- Note:
- A FIFO is a circular buffer where data are stored in the order in witch they arrive and can be read in the same order. A FIFO need 2 variables (call read and write pointers) to point both read and write registers.
- The library manage both read and write pointers with FIFO functions, but users can access the FIFO with their own code, users must then manage their own read pointers while write pointers (that are strictly private) can only be managed by the library functions.
is a FIFO where the Color Code objects are stored. FIFO can store up to 20 objects (CC_MAXOBJECT = 20)
| Pixy_NMFIFO[NM_MAXOBJECT] |
Direct access to the NM FIFO.
- Note:
- A FIFO is a circular buffer where data are stored in the order in witch they arrive and can be read in the same order. A FIFO need 2 variables (call read and write pointers) to point both read and write registers.
- The library manage both read and write pointers with FIFO functions, but users can access the FIFO with their own code, users must then manage their own read pointers while write pointers (that are strictly private) can only be managed by the library functions.
is a FIFO where the Normal objects are stored. FIFO can store up to 20 objects (NM_MAXOBJECT = 20)
Generated on Wed Jul 13 2022 05:22:42 by
1.7.2
