Homologation Cachan
Fork of TPixy-Interface by
Diff: Pixy.h
- Revision:
- 3:66df7d295245
- Parent:
- 2:fa582d9d91b5
- Child:
- 4:ee635fc62b6e
diff -r fa582d9d91b5 -r 66df7d295245 Pixy.h --- a/Pixy.h Mon Mar 14 17:50:40 2016 +0000 +++ b/Pixy.h Mon Mar 14 18:53:43 2016 +0000 @@ -7,22 +7,28 @@ #define X_CENTER ((PIXY_MAX_X-PIXY_MIN_X)/2) #define Y_CENTER ((PIXY_MAX_Y-PIXY_MIN_Y)/2) -/** The SPI interface for the Pixy camera - * Used for instantiating a Pixy object that interfaces via an SPI connection - * @param SPI* spi the pointer to the SPI connection - * @param Serial* serialOut the optional serial output pointer to print out Pixy camera data - * @param int arg an optional integer argument used for custom implementations of the Pixy library +/** The SPI Pixy interface for the Pixy camera * @code * #include "Pixy.h" * Serial serial(USBTX, USBRX); * SPI spi(p5, p6, p7); * PixySPI pixy(&spi, &serial); + * + * int main() { + * runPanTiltDemo(); + * } * @endcode */ class PixySPI : public TPixy<PixyInterfaceSPI> { public: + /** Constructor for the PixySPI class + * Instantiates a Pixy object that communicates via an SPI connection + * @param SPI* spi the pointer to the SPI connection + * @param Serial* serialOut the optional serial output pointer to print out Pixy camera data + * @param int arg an optional integer argument used for custom implementations of the Pixy library + */ PixySPI(SPI* spi, Serial* serialOut = NULL, uint16_t arg = PIXY_DEFAULT_ARGVAL) : TPixy<PixyInterfaceSPI>((new PixyInterfaceSPI(spi)), serialOut, arg) {} };