Revisiting Projects

I read recently that it can be good to bounce around from project to project. If I remember, the article said something about being able to take a step back and see things from different perspectives helps solve problems and such. Maybe. I am revisiting an old project, the Arduino as a temperature gauge. I remember that I didn't have accurate readings from the original prototype, and as I explained the problem to the guy at Radio Shack where I bought some of the parts, he gave me a fairly smug smile, and said it's not the parts,  it's the code (which I wrote). I believe him.

So now I am going to look into writing better code, but I have to examine the old project, and get into de-bugging mode. Glad to be back.

After about 45 minutes, I am seeing that I need to examine what the resistance values in my components are. I will be using this site as reference.
Here is the unit:


Here are some old notes and sketches:
I am learning to code with Arduino Uno.
I am doing this in order to start collecting data in the school garden. At this point it looks like we could track the temperature at different points in the garden, maybe soil temps and air temps. This data could be automatically written to a google spreadsheet and we could embed a graph from that data into a blog page so the data could be seen in real time on a blog page via a graph.

We could also track humidity and pressure. (It might be interesting to track air pressure data and compare it to discipline referrals.)

9/21/16: I brought out the Arduino, uploaded the old program, and tried to take some temperature readings. They were off; reading around 115 in the shade. I took the Arduino home, and tried recalibrating the unit, using icewater and then hotwater and recording the temperatures. You can see my data recording in the box to the right. It also has my calculations to determine the equation to use for my writeValue based on the readValue.


Here is the code I used in the program originally.

int tempPin=A0; //assigning temp pin to A0
int readValue; //declaring our read value variable
float Temperature; //declare our temperature variable
int numHalfMinutes=11; //number of 30 second intervals to print a temperature
String Message="thank you!"; //message to user
String Name;


void setup() {
pinMode(tempPin,INPUT); //declare tempPin an input
Serial.begin(9600); //start the serial port

}

void loop() {
readValue = analogRead(tempPin); //read tempPin and put value in readValue
Serial.println(readValue); //print readValue to serial monitor
//Temperature = (1.15)*readValue; //equation to display estimated Fahrenheit Temperature
delay(10000);

Comments