This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// RGB sensor code, stripped to basics, to get initialization working... | |
const i2c_ioexp = 0x7C; // I2C channel base adddreses | |
const i2c_als = 0xE8; // adjusted to 8 bit values | |
// Initialise the imp hardware | |
local i2c = hardware.i2c89; | |
i2c.configure(CLOCK_SPEED_100_KHZ); | |
// ------------------------------------------------ rgbdcs register definitions ----------------------------------------------------- | |
const rgbdcsRED = 0; const rgbdcsGREEN = 1; const rgbdcsBLUE = 2; const rgbdcsCLEAR = 3; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// RGB sensor code, stripped to basics, to get initialization working... | |
const i2c_ioexp = 0x7C; // I2C channel base adddreses | |
const i2c_als = 0xE8; // adjusted to 8 bit values | |
// Initialise the imp hardware | |
local i2c = hardware.i2c89; | |
i2c.configure(CLOCK_SPEED_100_KHZ); | |
// ------------------------------------------------ rgbdcs register definitions ----------------------------------------------------- | |
const rgbdcsRED = 0; const rgbdcsGREEN = 1; const rgbdcsBLUE = 2; const rgbdcsCLEAR = 3; |