void setup() {
pinMode(A0, INPUT);
Serial.begin(9600);
pinMode(3, OUTPUT);
void loop() {
int slide = analogRead(A0);
Serial.print("slider: ");
Serial.println(slide);
Serial.print("spenning ");
Serial.print(float(slide)/1023*5);
Serial.println("V");
int lys = mpat(slide, 0, 1023, 0, 255);
analogWrite(3, lys);
delay(200);
}