discoverpixy
Data Structures | Macros | Functions
pixy.h File Reference
#include <stdint.h>
#include "pixydefs.h"
Include dependency graph for pixy.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Block
 

Macros

#define PIXY_MAX_SIGNATURE   7
 
#define PIXY_MIN_X   0
 
#define PIXY_MAX_X   319
 
#define PIXY_MIN_Y   0
 
#define PIXY_MAX_Y   199
 
#define PIXY_RCS_MIN_POS   0
 
#define PIXY_RCS_MAX_POS   1000
 
#define PIXY_RCS_CENTER_POS   ((PIXY_RCS_MAX_POS-PIXY_RCS_MIN_POS)/2)
 
#define PIXY_BLOCKTYPE_NORMAL   0
 
#define PIXY_BLOCKTYPE_COLOR_CODE   1
 

Functions

int pixy_init ()
 Creates a connection with Pixy and listens for Pixy messages. More...
 
int pixy_blocks_are_new ()
 Indicates when new block data from Pixy is received. More...
 
int pixy_get_blocks (uint16_t max_blocks, struct Block *blocks)
 Copies up to 'max_blocks' number of Blocks to the address pointed to by 'blocks'. More...
 
int pixy_service ()
 
int pixy_command (const char *name,...)
 Send a command to Pixy. More...
 
void pixy_close ()
 Terminates connection with Pixy. More...
 
void pixy_error (int error_code)
 Send description of pixy error to stdout. More...
 
int pixy_led_set_RGB (uint8_t red, uint8_t green, uint8_t blue)
 Set color of pixy LED. More...
 
int pixy_led_set_max_current (uint32_t current)
 Set pixy LED maximum current. More...
 
int pixy_led_get_max_current ()
 Get pixy LED maximum current. More...
 
int pixy_cam_set_auto_white_balance (uint8_t value)
 Enable or disable pixy camera auto white balance. More...
 
int pixy_cam_get_auto_white_balance ()
 Get pixy camera auto white balance setting. More...
 
uint32_t pixy_cam_get_white_balance_value ()
 Get pixy camera white balance() More...
 
int pixy_cam_set_white_balance_value (uint8_t red, uint8_t green, uint8_t blue)
 Set pixy camera white balance. More...
 
int pixy_cam_set_auto_exposure_compensation (uint8_t enable)
 Enable or disable pixy camera auto exposure compensation. More...
 
int pixy_cam_get_auto_exposure_compensation ()
 Get pixy camera auto exposure compensation setting. More...
 
int pixy_cam_set_exposure_compensation (uint8_t gain, uint16_t comp)
 Set pixy camera exposure compensation. More...
 
int pixy_cam_get_exposure_compensation (uint8_t *gain, uint16_t *comp)
 Get pixy camera exposure compensation. More...
 
int pixy_cam_set_brightness (uint8_t brightness)
 Set pixy camera brightness. More...
 
int pixy_cam_get_brightness ()
 Get pixy camera brightness. More...
 
int pixy_rcs_get_position (uint8_t channel)
 Get pixy servo axis position. More...
 
int pixy_rcs_set_position (uint8_t channel, uint16_t position)
 Set pixy servo axis position. More...
 
int pixy_rcs_set_frequency (uint16_t frequency)
 Set pixy servo pulse width modulation (PWM) frequency. More...
 
int pixy_get_firmware_version (uint16_t *major, uint16_t *minor, uint16_t *build)
 Get pixy firmware version. More...