colorpal library  v0.5
Simplifies monitoring ColorPAL sensor with the Propeller.
Data Structures | Typedefs | Functions
colorpal.h File Reference

Simplifies reading Parallax ColorPAL sensor. More...

Go to the source code of this file.

Data Structures

struct  colorpal_serinfo

Typedefs

typedef struct colorpal_serinfo colorPal_t
typedef text_t colorPal

Functions

colorPalcolorPal_open (int sioPin)
 Open a connection to a Parallax ColorPAL sensor.
void colorPal_close (colorPal *device)
 Close a connection and recover all memory set aside for the ColorPal sensor instance.
void colorPal_getRGB (colorPal *device, int *r, int *g, int *b)
 Get RGB (red green blue) values from the ColorPAL sensor.

Detailed Description

Simplifies reading Parallax ColorPAL sensor.

Author
Andy Lindsay
Version
0.5

Typedef Documentation

typedef text_t colorPal

Defines instance of colorpal for use with simpletext functions that accept text_t parameters.

typedef struct colorpal_serinfo colorPal_t

Defines instance of colorpal_t settings for serial communication.

Function Documentation

void colorPal_close ( colorPal device)

Close a connection and recover all memory set aside for the ColorPal sensor instance.

Parameters
*devicedevice identifier returned by colorPal_open function.
void colorPal_getRGB ( colorPal device,
int *  r,
int *  g,
int *  b 
)

Get RGB (red green blue) values from the ColorPAL sensor.

Parameters
*devicedevice identifier returned by colorPal_open function.
rRed value.
gGreen value.
bBlue value.
colorPal* colorPal_open ( int  sioPin)

Open a connection to a Parallax ColorPAL sensor.

Parameters
sioPinPropeller I/O pin connected to ColorPAL sensor's SIO pin.
Returns
colorPal device identifier for use with functions in colorpal library and functions with text_t parameter in simpletext library.