A library for interfacing with the Pixy color recognition camera

Dependents:   PixyCamera MbedOS_Robot_Team ManualControlFinal PlayBack ... more

Embed: (wiki syntax)

« Back to documentation index

TPixyInterface Class Reference

TPixyInterface Class Reference

An interface for communicating between the Pixy and a specific hardware interface. More...

#include <TPixyInterface.h>

Inherited by PixyInterfaceSPI [private].

Public Member Functions

 TPixyInterface ()
 Creates a TPixyInterface.
virtual void init ()=0
 Initializes a TPixyInterface.
virtual int8_t send (uint8_t *data, uint8_t len)=0
 Sends the given data to the Pixy with a given data length.
virtual void setArg (uint16_t arg)=0
 Sets an argument for the interface to use.
virtual uint16_t getWord ()=0
 Reads a word from the interface.
virtual uint8_t getByte ()=0
 Reads a byte from the interface.

Detailed Description

An interface for communicating between the Pixy and a specific hardware interface.

Definition at line 34 of file TPixyInterface.h.


Constructor & Destructor Documentation

Creates a TPixyInterface.

Definition at line 39 of file TPixyInterface.h.


Member Function Documentation

virtual uint8_t getByte (  ) [pure virtual]

Reads a byte from the interface.

Returns:
the byte read from the interface

Implemented in PixyInterfaceSPI.

virtual uint16_t getWord (  ) [pure virtual]

Reads a word from the interface.

Returns:
the word read from the interface

Implemented in PixyInterfaceSPI.

virtual void init (  ) [pure virtual]

Initializes a TPixyInterface.

Implemented in PixyInterfaceSPI.

virtual int8_t send ( uint8_t *  data,
uint8_t  len 
) [pure virtual]

Sends the given data to the Pixy with a given data length.

Parameters:
datathe data to send
lenthe length of the data to send
Returns:
the interface return signal

Implemented in PixyInterfaceSPI.

virtual void setArg ( uint16_t  arg ) [pure virtual]

Sets an argument for the interface to use.

Parameters:
argthe argument to use

Implemented in PixyInterfaceSPI.