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

dexterind-dlight.h File Reference

Dexter Industries dLight Sensor Driver. More...

#include "common.h"
#include "drivers/common-light.h"

Go to the source code of this file.

Defines

#define DLIGHT_I2C_ADDR_ALL   0xE0
#define DLIGHT_I2C_ADDR_1   0x04
#define DLIGHT_I2C_ADDR_2   0x14
#define DLIGHT_I2C_ADDR_3   0x24
#define DLIGHT_I2C_ADDR_4   0x34
#define DLIGHT_REG_MODE1   0x80
#define DLIGHT_REG_MODE2   0x81
#define DLIGHT_REG_RED   0x82
#define DLIGHT_REG_GREEN   0x83
#define DLIGHT_REG_BLUE   0x84
#define DLIGHT_REG_EXTERNAL   0x85
#define DLIGHT_REG_BPCT   0x86
#define DLIGHT_REG_BFREQ   0x87
#define DLIGHT_REG_LEDOUT   0x88
#define DLIGHT_CMD_DISABLE_LEDS   0x00
#define DLIGHT_CMD_DISABLE_BLINK   0xAA
#define DLIGHT_CMD_ENABLE_BLINK   0xFF

Functions

bool DLIGHTinit (tSensors link, ubyte addr)
bool DLIGHTsetColor (tSensors link, ubyte addr, ubyte r, ubyte g, ubyte b)
bool DLIGHTsetExternal (tSensors link, ubyte addr, ubyte external)
bool DLIGHTsetBlinking (tSensors link, ubyte addr, float BlinkRate, long DutyCycle)
bool DLIGHTstartBlinking (tSensors link, ubyte addr)
bool DLIGHTstopBlinking (tSensors link, ubyte addr)
bool DLIGHTdisable (tSensors link, ubyte addr)

Variables

tByteArray DLIGHT_I2CRequest

Detailed Description

Dexter Industries dLight Sensor Driver.

dexterind-dlight.h provides an API for the Dexter Industries dLight Sensor Driver

Changelog:

Credits:

License: You may use this code as you wish, provided you give credit where its due.

THIS CODE WILL ONLY WORK WITH ROBOTC VERSION 3.59 AND HIGHER.

Author:
Xander Soldaat (xander_at_botbench.com)
Date:
09 March 2013
Version:
0.1

Definition in file dexterind-dlight.h.