top of page

Project Display: 

 

If you matched..

 Users start by holding hands on the sensor.

If not..

Project Brief: 

For this week's assignment, we're creating a Love Compatibility Machine by Arduino. I decide to use DHT 11 temperature sensor to create my Love Compatibility Machine. Because I read something that when you are with someone you loved, your heartbeat goes faster, and your body temperature goes higher. That's why I decided to use the temperature sensor to create the machine. 

I decide to use 4 lights to indicate the level of love between them. Setting my room temperature as the baseline and letting the user hold hands on the sensor. Whenever the temperature goes up by 1, the next LED will light up and the next one will start the breathing effect, meaning the temperature keeps going up.  

If only one light is on, meaning that you guys are not fit. You probably want to look for someone else. 
If 2 lights are on, meaning you guys fit OK. 
If 3 lights are on, meaning good match! 
If all 4 lights are on, you should get married immediately.

 

I first download the DHT sensor libraries from Adafruit, follow the examples to print out temperature and humidity and make sure my DHT 11 works well. 

Then I start writing my code. I created 4 individual circuits for each light. I first set all lights output to low. Using the If statement to control each light in different temperature situations. Also using for loop to control the "breath" effect. Because I want at least 1 light to be up. Based on my room temperature, I set the base temperature for my function as 22.

If the temperature is under 22, meaning the current mood in the room is freezing, only the first orange light will have the breath effect, which means keep up! 

If the temperature is between 22 - 23, the first and the second orange light will be on. The third green light will start the breathing effect. This means you guys are in an OK mood. You may want to continue dating him/her. 

If the temperature is between 23 - 24, the first, second, and third lights will be on. The fourth light will be in the breathing effect. Meaning that you guys are almost the best match. 

And then lastly, if the temperature is over 24, all four light is on, meaning that you guys should get married immediately. 














Then I push the code into my Arduino and test it and I notice something doesn't work quite right. When the temperature hits to another level and the next light is on, the previous light will be on. 

Looking back on my code, I noticed I set the breathing light's analog to 0 in the for a loop. That's why when it comes to the next loop, the light seems off. I went back to set the analog back, and everything works fine. 

 

Testing my Love Compatibility Machine

Project Display: 

 

If you matched..

If not..

bottom of page