I'm trying to make 2 strips at 2 pins PB13 and PB12 to run 2 different effects from color palette
The first strip will display the pattern if arduino receive command from serial (type a number in range 11-28 from serial monitor) and the second strip do the same but different pattern (type a number in range 29-46)
both number are stored in EEPROM to remember which pattern are being used after power off
I was successfully run with 1 pattern display to all the LEDs
Now I want them to work independently but I cant compile because this error
" expected initializer before 'currentPalette' "
the code below
thanks for paying attention
led_hub_terminal.ino (16.1 KB)
This line is incompleate
static const uint16_t
and is screwing up where the compiler thinks it is.
When you get past that you will find that the variable PC13 has not been defined.
Then you also have not defined PB13 & PB12
No doubt there is other stuff wrong as well but I stopped looking after that.
thanks bro. How stupid I am, that incomplete line was the problem (actually I just deleted the serial time out value but forgot to delete that line)
and PC13, Pb12 PB13 are the Stm32f103c8t6's pins
thanks
the CODE is working now.perfect. and for who wanna use
just edit this part,
if (paletteCounter!= paletteCounter2 && maincounter==paletteCounter){
EEPROM.write(eepaddress,paletteCounter);
paletteCounter2=paletteCounter;
}
if (speedcounter!= speedcounter2&& maincounter==speedcounter){
EEPROM.write(eepaddress1,speedcounter);
speedcounter2=speedcounter;
}
if (paletteCounter3!= paletteCounter4&&maincounter==paletteCounter3){
EEPROM.write(eepaddress2,paletteCounter3);
paletteCounter4=paletteCounter3;
}
with my code attached before. the EEPROM write stuck
thank you ,GRUMPY, again
kaitoukid93:
that incomplete line was the problem
A good tip to remember is that if the compiler throws an error, and you can't see it on the line it complains about, most of the time it is on the line before that.
the CODE is working now.perfect. and for who wanna use
just edit this part,
Good, well done. And also well done on reporting your solution, have a Kama point for that.