Trouble using Blinkm
Posted: 06 Apr 2009 07:19
I'm am trying to interface my PIC16F886 with a Blinkm, but I cannot seem to communicate to the Blinkm, because it remains always in its demo mode.
I've tried to demonstrate communication by setting a color with this code:
void main () {
Soft_I2C_Config(&PORTC, 4, 3);
Soft_I2C_Start();
Soft_I2C_Write(0x09); // Address BlinkM
Soft_I2C_Write(0x6e);
Soft_I2C_Write(0);
Soft_I2C_Write(0);
Soft_I2C_Write(150);
Soft_I2C_Stop();
}
I've also tried the hard I2C Library. Nothing seems to work. If anyone has example code or advice, it would be greatly appreciated. For those wondering, I am pretty sure the hardware connections are made correctly (with pull up resistors on the clock and data pins).
Thanks
I've tried to demonstrate communication by setting a color with this code:
void main () {
Soft_I2C_Config(&PORTC, 4, 3);
Soft_I2C_Start();
Soft_I2C_Write(0x09); // Address BlinkM
Soft_I2C_Write(0x6e);
Soft_I2C_Write(0);
Soft_I2C_Write(0);
Soft_I2C_Write(150);
Soft_I2C_Stop();
}
I've also tried the hard I2C Library. Nothing seems to work. If anyone has example code or advice, it would be greatly appreciated. For those wondering, I am pretty sure the hardware connections are made correctly (with pull up resistors on the clock and data pins).
Thanks