We must scale our read values (0 to 1023) to suitable write values (0 to 255).
The math above shows how to derive an equation that allows us to calculate a suitable write value (0-255) from a read value (0-1023) on an arduino microcontroller.
Making The World a Better Place One High Tech Project at a Time. Enjoy!