Disclaimer: The IR sensor for this activity is not medical grade. It cannot serve diagnostic purposes. If at any point you are concerned about your temperature, use a medical thermometer. If you are still concerned, consider consulting your family physician.
What you will need for this activity:
Arduino/USB
Arduino Wires
Infrared Sensor
OLED Screen
You should already have completed the regular IR Touchless Temp Sensor Activity. Use the button below to go to that activity if you need to look back at that activity.
Both Sensors connect to the same part of the Arduino Board. Use jumper wires to connect one of them to the breadboard, and then put the other device's pins on the same breadboard rows. The wiring for the sensors is as follows: 1) Vin to breadboard to 5V on Arduino 2) GND to breadboard to GND on Arduino 3) SCL to breadboard to A5 on Arduino 4) SDA to breadboard to A4 on Arduino
Both on their own
Example for Connecting Both
Coding for Two Devices
To code for two devices, you really should have done each one on its own successfully first. Here are buttons to take you to the independent lessons to check if you have already done them.
Here are the two independent codes that we need to combine to get both devices to work.
Hello World OLED Text Code
What are the main code sections in both? 1) Before setup 2) Setup 3) Loop
Touchless Temp Sensor to Serial Monitor Code
We need to combine those 3 main parts to make this code work. I highly recommend loading up one of your old codes and then making a new save file. This way you are starting with something you know works, and then have less to add to finish this.
An Example of Combining the Code
There are many ways we could combine these two coding examples to make it work
"Calibrating" the sensor
Is your Serial Monitor displaying temperatures that are lower or higher than your actual body's temperature? If so, then you can calibrate the sensor by adding a "correction factor" to your code.
I used a thermometer to check my temperature. Turned out it was 98.5 F but my sensor was reading about 5 too low :( To correct the reading by 5 F, I put +5 on the ObjectTempF row
Here are the the readings after the correction.
Self Paced add on: Touchless temp sense gun
If you have a 3D printer at home, the items you just learned how to use can be put in a 3D print to make a touchless temp sensor. Here are steps for that. It uses the Arduino Nano (a smaller board) but those are only about 7$. 3D print files: https://www.thingiverse.com/thing:3901662