Hi ,
I'm building a code for the breath light on the LP5024EVM.
I find out my code that would off all LED 0.5sec , after It finish the sweep of RED and Green LED.
Does it HW or SW issue??
My code:
// Color Sweep
for (int i = 0; i < color_bright; i++) {
Wire.beginTransmission(ADDRESS_SLAVE);
Wire.write(0x06);
Wire.write(i); // LED BankC Color Blue
Wire.endTransmission();
//delay(10);
for (int j = 0; j < color_bright; j++) {
Wire.beginTransmission(ADDRESS_SLAVE);
Wire.write(0x05);
Wire.write(j); // LED BankB Color green
Wire.endTransmission();
delay(10);
}
for (int k = 0; k < color_bright; k++) {
Wire.beginTransmission(ADDRESS_SLAVE);
Wire.write(0x04);
Wire.write(k); // LED BankA Color red
Wire.endTransmission();
delay(10);
}
for (int k = color_bright; k >0; k--) {
Wire.beginTransmission(ADDRESS_SLAVE);
Wire.write(0x04);
Wire.write(k); // LED BankA Color red
Wire.endTransmission();
delay(10);
}
for (int j = color_bright; j < 0; j--) {
Wire.beginTransmission(ADDRESS_SLAVE);
Wire.write(0x05);
Wire.write(j); // LED BankB Color green
Wire.endTransmission();
delay(10);
}
}