I have a code I have to rewrite, I'm pretty new at Arduino and I've come across the "lcd.setPWM(color, i) statement and I don t really know what it does, and I couldn t quite find it online.
setPWM(color,i)
can be used to adjust the Pulse-width modulation frequency, which determines how many full 'pulses' per second are generated by the Controller.
This function will be used to control the color range that you want to select. Probably with a for loop like in:
for(int i=0; i<255; i++){
lcd.setPWM(color, i);
delay(5);
}
The 256 range is probably because of the typically 256-cubed (8 bits in three color channels with values of 0–255) for encode colors.