Hello,
I am trying to add additional functionality to the Arduino example files. I have looked through the github repo to try to gain an understanding of the sequence of events but have failed to figure out how methods from the arduino api are mapped to the native Pixy methods. So far I have looked at the setBrightness method. I figured out the following:
TPixy.h - 249: setBrightness -> calls send() with identifier 0x00 and 0xff in Pixy.h
Pixy.h - ln 113: int8_t send -> calls flushSend() -> calls getWordHw() -> calls Spi.transfer()
So at this point I figured some identifier has to be passed via SPI to the Pixy. I searched for “0xfe” from the setBrightness method but this wasn’t used anywhere else.
I found some interesting methods below that somehow must be called:
pixy_cam_set_brightness(uint8_t brightness)
int32_t cam_setBrightness(const uint8_t &brightness)
Can someone explain how methods are mapped from the Arduino api to the native pixy methods? I’d like to access all the methods listed on the libpixyusb-0.4 API Reference page.
I’m also happy to add the methods to the github repo for others to use.