CVARS WA7UHD

CVARS
The Chehalis Valley
Amateur Radio Society
WA7UHD

ARRL special service club




Electronics Workshop - January 26, 2017

Time & Location:

Topics:
  1. “What I Did Over the Holidays”
  2. Arduino Programming
  3. Measuring FM Deviation

Notes:

/* Reading Temperature: LM35 to 5v, GND, and Vo to analog 0 */
/* Vo = 0.01 V/°C; NOTE: 70°F=21.1°C = 0.211V               */
int lm35Pin = A0;                          // output pin of LM35 sensor

void setup()
{
  Serial.begin(9600);                      // serial at 9600 baud   
}

void loop()
{
  int analogValue;
  float temperature;

  analogValue = analogRead(lm35Pin);       // read temperature sensor

  temperature = float(analogValue) / 1023; // 10bit analog value to Celsius
  temperature = temperature * 500;

  Serial.print("Temp: ");                  // print temperature over serial
  Serial.print(temperature);
  Serial.println("C");

  delay(1000);                             // wait 1 second, then repeat
}
		

Reference:
  1. http://www.ti.com/lit/ds/symlink/lm35.pdf
  2. http://www.febo.com/packet/layer-one/transmit.html

 Return to the top of the page. 


Updated 01/23/2017.    Email webmaster.      Facebook Link