This is how you use the blinkmk in ARC .
The address of the blinkm is default 0x09 (that's 7 bit). you need to turn that number into an 8 bit number to write, that's 0x12. The LSB of the i2c address is reserved for the direction of data. A 1 in the LSB means READ, and a 0 in LSB means WRITE.
If you look at the datasheet (google search blinkm datasheet), you'll see commands.
This will turn a blinkm to the color red:
I2CStart() I2CWrite(0x12, 0x6e, 0xff, 0x00, 0x00) I2CStop()
This is how you turn a blinkm to the color green
I2CStart() I2CWrite(0x12, 0x6e, 0x00, 0xff, 0x00) I2CStop()
This is how you turn a blinkm to the color blue
I2CStart() I2CWrite(0x12, 0x6e, 0x00, 0x00, 0xff) I2CStop()
note: hex is NOT case sensitive. you can use upper or lower case, it doesn't matter. 0xFF also equals 0xff. However, 0XFF is not hex. The X is always lower case in HEX. Google will help you understand why.
You may also not use hex and use characters instead. Like most programming languages, characters are defined with single quotes ' and strings are defined with double quotes ". You can use the letter 'n' instead of 0x6e in this peice of code...
Skip to comments
I2CStart() I2CWrite(0x12, 'n', 0x00, 0x00, 0xff) I2CStop()