Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Arduino - LM35 Sensor Temperatura

By: tessomc on Oct 3rd, 2012  |  syntax: C  |  size: 0.20 KB  |  hits: 79  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. int analogPin = 2;
  2. int valAnalog;
  3.  
  4. void setup() {
  5.   Serial.begin(9600);
  6. }
  7.  
  8. void loop(){
  9. valAnalog = (5 * analogRead(analogPin) * 100) / 1024; //Celsius
  10. Serial.println(valAnalog);
  11. delay(1000);
  12. }