Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //www.elegoo.com
- //2016.06.13
- int sensorPin = A0; // select the input pin for the potentiometer
- //int ledPin = 13; // select the pin for the LED
- int sensorValue = 0; // variable to store the value coming from the sensor
- void setup()
- {
- //pinMode(ledPin,OUTPUT);
- Serial.begin(9600);
- }
- void loop(){
- sensorValue = analogRead(sensorPin);
- if(sensorValue > 58)
- {
- Serial.println(sensorValue, DEC);
- delay(250);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement