• Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
HomeArduinoSensors Kit for ArduinoKY013: Analog Temprature Sensor
Previous Next

KY013: Analog Temprature Sensor

Posted by: admin , April 25, 2014

 

int sensorPin = A5;    // 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);    

  digitalWrite(ledPin, HIGH);  

 delay(sensorValue);          

  digitalWrite(ledPin, LOW);   

 delay(sensorValue);

 Serial.println(sensorValue, DEC);  

}

Tags: Sensors Kit for Arduino

Share!
Tweet

admin

About the author

Leave a Reply Cancel reply

You must be logged in to post a comment.

Category

  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors