Mindstorms 3rd Party ROBOTC Drivers RobotC
[Home] [Download] [Submit a bug/suggestion] [ROBOTC Forums] [Blog] [Support this project]
Files | Defines | Functions

Magic Wand
[Mindsensors]

Files

file  mindsensors-magicwand.h
 

Mindsensors Magic Wand.


Defines

#define MSMWclearALL(X)   PCF8574sendBytes(X, 0xFF)
#define MSMWsetALL(X)   PCF8574sendBytes(X, 0x00)

Functions

bool MSMWsetLED (tSensors link, ubyte ledToChange, bool on)
bool MSMWtoggleLED (tSensors link, ubyte ledToChange)
bool MSMWflashAndClear (tSensors link, int count)

Detailed Description

Magic Wand


Define Documentation

#define MSMWclearALL (   X )    PCF8574sendBytes(X, 0xFF)
Examples:
mindsensors-magicwand-test1.c.

Definition at line 43 of file mindsensors-magicwand.h.

#define MSMWsetALL (   X )    PCF8574sendBytes(X, 0x00)
Examples:
mindsensors-magicwand-test1.c.

Definition at line 44 of file mindsensors-magicwand.h.


Function Documentation

bool MSMWflashAndClear ( tSensors  link,
int  count 
)

Flash the LEDs and turn them off again. Nice effect.

Parameters:
linkthe Magic Wand port
countnumber of times to flash the LEDs
Returns:
true if no error occured, false if it did
Examples:
mindsensors-magicwand-test1.c.

Definition at line 89 of file mindsensors-magicwand.h.

bool MSMWsetLED ( tSensors  link,
ubyte  ledToChange,
bool  on 
)

Turn a specific LED on or off.

Parameters:
linkthe Magic Wand port
ledToChangethe index of the LED to change (0-7)
onstateof the LED, true = on, false = off
Returns:
true if no error occured, false if it did
Examples:
mindsensors-magicwand-test1.c.

Definition at line 53 of file mindsensors-magicwand.h.

bool MSMWtoggleLED ( tSensors  link,
ubyte  ledToChange 
)

Toggle a LED

Parameters:
linkthe Magic Wand port
ledToChangethe index of the LED to change (0-7)
Returns:
true if no error occured, false if it did
Examples:
mindsensors-magicwand-test1.c.

Definition at line 72 of file mindsensors-magicwand.h.