Hello there, anyone had succedeed in changing the color of this RGB module? I am trying to port the arduino code to the mbed code.
Here you are the arduino code
Wire.begin(); // set up I2C
Wire.beginTransmission(0x09);// join I2C, talk to BlinkM 0x09
Wire.send(‘c’); // ‘c’ == fade to color
Wire.send(0xff); // value for red channel
Wire.send(0xc4); // value for blue channel
Wire.send(0x30); // value for green channel
Wire.endTransmission(); // leave I2C bus
And this is my translation of the code ported to mbed
#include "mbed.h"
I2C i2c (p28,p27); // Setup the I2C interface: sda, scl
int main() {
i2c.write(0x09, "c", 1); // Send command string
i2c.write(0x09, "0xff", 1); // Send command string
i2c.write(0x09, "0xc4", 1); // Send command string
i2c.write(0x09, "0x30", 1); // Send command string
}
Link to the compiler code: BlinkM
The only problem is: it does not work... Can someone help me please?
Thanks
Note: 0x09 is the factory address of this I2C module
Please find below the datasheet of this module including arduino samples
http://thingm.com/fileadmin/thingm/downloads/BlinkM_datasheet.pdf
Hello there, anyone had succedeed in changing the color of this RGB module? I am trying to port the arduino code to the mbed code.
Here you are the arduino code
And this is my translation of the code ported to mbed
Link to the compiler code: BlinkM
The only problem is: it does not work... Can someone help me please?
Thanks
Note: 0x09 is the factory address of this I2C module
Please find below the datasheet of this module including arduino samples
http://thingm.com/fileadmin/thingm/downloads/BlinkM_datasheet.pdf