$ 129 32 5E-05 0 5 50 Black 2048 2048 true R 416 544 320 544 0 0 1 12 0 0 0.5 242 704 384 704 448 4096 %2F%2A%0A%20%2A%20Created%20by%20ArduinoGetStarted.com%0A%20%2A%0A%20%2A%20This%20example%20code%20is%20in%20the%20public%20domain%0A%20%2A%0A%20%2A%20Tutorial%20page%3A%20https%3A%2F%2Farduinogetstarted.com%2Ftutorials%2Farduino-potentiometer-fade-led%0A%20%2A%2F%0A%0Aint%20LED_PIN%20%3D%203%3B%20%20%2F%2F%20the%20PWM%20pin%20the%20LED%20is%20attached%20to%0A%0A%2F%2F%20the%20setup%20routine%20runs%20once%20when%20you%20press%20reset%3A%0Avoid%20setup%28%29%20%7B%0A%20%20%2F%2F%20initialize%20serial%20communication%20at%209600%20bits%20per%20second%3A%0A%20%20Serial.begin%289600%29%3B%0A%0A%20%20%2F%2F%20declare%20LED%20pin%20to%20be%20an%20output%3A%0A%20%20pinMode%28LED_PIN%2C%20OUTPUT%29%3B%0A%7D%0A%0A%2F%2F%20the%20loop%20routine%20runs%20over%20and%20over%20again%20forever%3A%0Avoid%20loop%28%29%20%7B%0A%20%20%2F%2F%20reads%20the%20input%20on%20analog%20pin%20A0%20%28value%20between%200%20and%201023%29%0A%20%20int%20analogValue%20%3D%20analogRead%28A0%29%3B%0A%0A%20%20%2F%2F%20scales%20it%20to%20brightness%20%28value%20between%200%20and%20255%29%0A%20%20int%20brightness%20%3D%20map%28analogValue%2C%200%2C%201023%2C%200%2C%20255%29%3B%0A%0A%20%20%2F%2F%20sets%20the%20brightness%20LED%20that%20connects%20to%20%20pin%203%0A%20%20analogWrite%28LED_PIN%2C%20brightness%29%3B%0A%0A%20%20%2F%2F%20print%20out%20the%20value%0A%20%20Serial.print%28%22Analog%3A%20%22%29%3B%0A%20%20Serial.print%28analogValue%29%3B%0A%20%20Serial.print%28%22%2C%20Brightness%3A%20%22%29%3B%0A%20%20Serial.println%28brightness%29%3B%0A%20%20delay%28100%29%3B%0A%7D%0A g 640 608 640 672 0 174 576 800 576 864 0 100000 0.3 Resistance w 704 704 608 704 0 w 608 704 608 832 0 w 576 896 576 864 0 r 1056 576 960 576 0 100 g 576 896 576 960 0 278 448 544 448 608 0 7805 g 1120 768 1120 864 0 w 1120 768 1120 608 0 181 1120 352 1120 416 0 0 50 12 0.4 0.4 w 1120 416 1120 544 0 w 640 608 640 576 0 w 704 576 640 576 0 f 1056 576 1120 576 0 5 1 w 896 768 960 768 0 w 960 768 960 576 0 w 576 544 672 544 0 w 672 544 672 608 0 w 672 608 704 608 0 w 576 544 576 800 0 w 512 608 512 896 0 w 512 896 576 896 0 w 416 544 448 544 0 w 416 544 416 320 0 w 416 320 1120 320 0 w 1120 320 1120 352 0 o 0 0 0 0 3 0 0.00808704622053869 1 -5 5 E30.2 2&TriggerLevel=2.5&TriggerEvent=1