<< return to Pixycam.com

User Tools

Site Tools


wiki:v2:general_api

**This is an old revision of the document!**

Pixy2 General API

Methods

int8_t init(uint32_t arg[optional])

init() should be called before your program communicates with Pixy. init() returns an error value (<0) if it fails and 0 (PIXY_RESULT_OK) if it succeeds.

int8_t getVersion()

getVersion() queries the firmware and hardware version of Pixy2. The version information is put in the version data member

int8_t changeProg(const char *prog)

int8_t setServos(uint16_t s0, uint16_t s1)

int8_t setCameraBrightness(uint8_t brightness)

int8_t setLED(uint8_t r, uint8_t g, uint8_t b)

int8_t setLamp(uint8_t upper, uint8_t lower)

Data members

Version *version

uint16_t frameWidth

uint16_t frameHeight

Pixy2CCC ccc

Pixy2Line line

Error codes

PIXY_RESULT_ERROR

PIXY_RESULT_BUSY

PIXY_RESULT_CHECKSUM_ERROR

PIXY_RESULT_TIMEOUT

PIXY_RESULT_BUTTON_OVERRIDE

wiki/v2/general_api.1526991200.txt.gz · Last modified: 2018/05/22 12:13 by pixycam