Arduino Project-Love-O-Meter

I am starting new project called love-o-meter from Arduino project book number 3. There is a component called temperature sensor that will meter how warm  your skin is. The sensor output and use it to red LED turn on and off based on how warm you are. There will be a arduino code to activate response of body temperature.The code will be coded in celsius degrees. The temperature sensor is like a thermometer.

Materials needed

3 LED red    IMG_2186


220 OHM resistor  (3)  IMG_2183

click on the image it will show circle of what type of resistor we are using and how many bands.

jumper wire (8)IMG_2185

temperature sensor (TMP36)   IMG_2181             IMG_2180

Picture show the flat side and rounded side of temperature sensor

Arduino breadboard IMG_2187

Arduino uno

step 1: layer out the material you may onto a white printing paper so that you do not misplace anything. Line up the Arduino uno and breadboard side by side parallel to each other. Wire up breadboard so it connect to ground and power. Red jumper wire (Power connection) will go from 5v (arduino uno) to plus symbol on breadboard. Black jumper wire will go from ground (arduino uno) to negative symbol on arduino can see that the negative color black and positive color red. In addition the breadboard should say at the bottom +- abcde etc..

Step 2: Attach the LEDs. THe cathode (GND connection) (short leg) of each of the leds  go to ground through 220-ohm resistor. Connnect the anodes (power conection) (long leg) of led to pins 2 through 4.

The in between steps: connect jumper wire to breadboard on number 6 and + sign, Connect jumper wire to 7 on boardboard and A0 on arduino uno. Jumper wire to 20 (breadboard) and 4 on uno, 2nd jumper wire on 24 (board) to uno (-3). 3rd jumper wire 28 on (breadboard) to 2(uno). oops there more there would be a shortage if there was no resistors. one 220 ohms resistor connect to b-21 across to a negative,b-25 across,b-28 to negative. negative is ground.

Step 3: place the TMP36 on the breadboard with round part facing away from arduino (PLEASE NOTE: the order if pins is important) connect the left pin of the flat facing side to power. The right pin to ground and connect center pin-pin A) on your arduino board. This is analog input pin 0.

Final step: code the program on arduino free source application and  plug in usb to arduino one and upload the program to the circuit.

conclusion: the love-o-meter project for me did not work. I could not figure out why but it would have been cool if it did.


Love-o-meter code

const int sensorPin = A0;
const float baselineTemp = 20.0;
void setup (){
Serial.begin(9600); //opens the serial port
for (int pinNumber =2; pinNumber <5; pinNumber++){
digitalWrite(pinNumber, LOW);
void loop (){
int sensorVal = analogRead(sensorPin);
Serial.print (“Sensor Value: “);
Serial.print (sensorVal);
//convert the Analog to digital converter ADC
float voltage = (sensorVal/1024.0) * 5.0;
Serial.print (“, Volts: “);
Serial.print (voltage);
Serial.print (“degree C: “);
//convert the voltage to temperature in degrees
float temperature = (voltage – .5) * 100;
if (temperature <baselineTemp){
digitalWrite(2, LOW);
digitalWrite(3, LOW);
digitalWrite(4, LOW);
}else if (temperature >= baselineTemp+2 && temperature < baselineTemp+4){
digitalWrite(2, HIGH);
digitalWrite(3, HIGH);
digitalWrite(4, LOW);
}else if (temperature >= baselineTemp+4 && temperature < baselineTemp+6){
digitalWrite(2, HIGH);
digitalWrite(3, HIGH);
digitalWrite(4, HIGH);
delay (1);


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s