Advertisement
Guest User

Arduino Bluetooth LM35

a guest
May 10th, 2015
3,219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1. float temperature;
  2. int tempPin = 0; // Pin OUT from LM35 is connected to Pin A0
  3.  
  4. void setup()
  5. {
  6.   Serial.begin(38400); //baudrate adjust to your bluetooth module
  7. }
  8.  
  9. void loop()
  10. {
  11.   temperature = analogRead(tempPin);
  12.   temperature = temperature * 0.48828125;
  13.   Serial.print(temperature);
  14.   delay(1000);
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement