“A really accurate temperature display using the BME280 sensor and LCD screen.
This project is a very accurate thermometer that uses the BME280 temperature. I decided to make this project to iterate on a tutorial I found, which uses the lm35 temperature sensor. When the tutorial circuit was built, I noticed the temperature was very unprecise, and I was suggested to iterate the project, with a more accurate sensor like the BME280. It uses the BME280 sensor to get a temperature reading (in celsius), then it constantly prints that value onto the LCD screen.
- The BME280 sensor is much more complex and has lots more functions than the lm35, so just to get it working took multiple hours. For example, researching the difference between I^2C and SPI and then learning what pins/commands are needed for it to work on both.
- The LCD screen wasn’t initially working since the potentiometer wasn’t pushed all the way down.
- Connect Wires from Arduino UNO to LCD screen, while making sure to use a resistor on the anode (2nd pin from left) and a potentiometer on the contrast control pin (3rd pin from the right). Use digital pins 12, 11, 5, 4, 3. If you don’t wire it to those digital pins, make sure to change the pin number at the top of the code.
- Connect BME280 sensor. “VIN” pin should go to power, “GND” to ground, “SCK” pin to A5, and “SDI” pin to A4. If the sensor is wired incorrectly, you will get an error message on the screen.
- Use the code provided and paste it into whichever program that you use.
- After uploading the code you should have a working thermometer.”