The problem seems to be with
sensorValue = analogRead(i);
sensorValue is a byte so its range is 0-255
then you map:
sensorValue = map(sensorValue, 0, 1024, 0, 255);
so sensorValue=255*255/1024=63
I hope this can help you
The problem seems to be with
sensorValue = analogRead(i);
sensorValue is a byte so its range is 0-255
then you map:
sensorValue = map(sensorValue, 0, 1024, 0, 255);
so sensorValue=255*255/1024=63
I hope this can help you