top of page
Temperature Logger Code

long time;
void setup() {
  Serial.begin(9600); 
//This sets up the serial port so that the temperature can be read.
}

void loop() {
  time = millis();
  Serial.print(time/1000); 
  //prints time since program started
  Serial.print(" , ");
  int sensorVal = analogRead(0); 
//Stores the value being read by the center pin.
  int val=analogRead(0);//Connect LM35 on Analog 0     
  float temperature=(500 * val) /1024;
  Serial.print(temperature); 
//Prints the temperature.
  Serial.println();

  delay(1000);           
 // wait a second so as not to send massive amounts of data
}

Igniting Innovation through Functional Prototyping and Physical Computing

Contact Information

odysseyboardedu.@gmail.com
Phone: (360) 303-5526
24338 Lee Road
Mount Vernon, WA 98274

Contact Us

Thanks for submitting!

© 2017 by Odyssey Board. All rights reserved.

bottom of page