A library for interfacing with the Pixy color recognition camera
Dependents: PixyCamera MbedOS_Robot_Team ManualControlFinal PlayBack ... more
TPixy< TPixyInterface > Class Template Reference
The superclass handler for the Pixy camera from a given connection handler (SPI, I2C, etc) Used for instantiating a Pixy object that interfaces via an abtritrary connection handler. More...
#include <TPixy.h>
Public Member Functions | |
TPixy (TPixyInterface *type, Serial *serialOut=NULL, uint16_t arg=PIXY_DEFAULT_ARGVAL) | |
Creates a TPixy object with a given connection handler. | |
void | printBlock (Block &block) |
Prints the given Block out to the given serial port. | |
uint16_t | getBlocks (uint16_t maxBlocks=1000) |
Returns the number of Blocks found in the current view and updates all Blocks' info. | |
int8_t | setServos (uint16_t s0, uint16_t s1) |
Sets the PWM value of the Pixy servos. | |
int8_t | setBrightness (uint8_t brightness) |
Sets the brightness of the Pixy RGB LED. | |
int8_t | setLED (uint8_t r, uint8_t g, uint8_t b) |
Sets the color of the Pixy RGB LED. | |
void | init () |
Initializes the Pixy. |
Detailed Description
template<class TPixyInterface>
class TPixy< TPixyInterface >
The superclass handler for the Pixy camera from a given connection handler (SPI, I2C, etc) Used for instantiating a Pixy object that interfaces via an abtritrary connection handler.
Definition at line 71 of file TPixy.h.
Constructor & Destructor Documentation
TPixy | ( | TPixyInterface * | type, |
Serial * | serialOut = NULL , |
||
uint16_t | arg = PIXY_DEFAULT_ARGVAL |
||
) |
Creates a TPixy object with a given connection handler.
- Parameters:
-
type the pointer to the interface connection handler serialOut the optional serial output pointer to print out Pixy camera data arg an optional integer argument used for custom implementations of the Pixy library
Member Function Documentation
uint16_t getBlocks | ( | uint16_t | maxBlocks = 1000 ) |
void printBlock | ( | Block & | block ) |
int8_t setBrightness | ( | uint8_t | brightness ) |
int8_t setLED | ( | uint8_t | r, |
uint8_t | g, | ||
uint8_t | b | ||
) |
Generated on Tue Jul 12 2022 18:15:33 by 1.7.2