Visuino I2C BMP280 Pressure,Temperature+OLED
by RonFrtek in Circuits > Arduino
6197 Views, 12 Favorites, 0 Comments
Visuino I2C BMP280 Pressure,Temperature+OLED
In this tutorial we will use I2C BMP280 pressure, temperature sensor, OLED lcd, Arduino UNO measure pressure and temperature and display results on the LCD. Watch a demonstration video.
What You Will Need
- Arduino UNO (can be any other Arduino)
- Jumper wires
- OLED lcd
- I2C BMP280 sensor
- Visuino program: Download Visuino
The Circuit
- Connect Arduino pin (SCL) to BMP280 pin (SCL)
- Connect Arduino pin (SDA) to BMP280 pin (SDA)
- Connect Arduino pin (SCL) to OLED LCD pin (SCL)
- Connect Arduino pin (SDA) to OLED LCD pin (SDA)
- Connect Arduino pin (5V) to OLED LCD pin (VCC)
- Connect Arduino pin (3.3V) to BMP280 pin (VCC)
- Connect Arduino pin (GND) to OLED LCD pin (GND)
- Connect Arduino pin (GND) to BMP280 pin (GND)
Start Visuino, and Select the Arduino UNO Board Type
To start programming the Arduino, you will need to have the Arduino IDE installed from here: http://www.arduino.cc/.
Please be aware that there are some critical bugs in Arduino IDE 1.6.6. Make sure that you install 1.6.7 or higher, otherwise this Instructable will not work! If you have not done follow the steps in this Instructable to setup the Arduino IDE to program ESP 8266! The Visuino: https://www.visuino.eu also needs to be installed. Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "Arduino UNO" as shown on Picture 2
In Visuino Add Components
- Add Pressure Temperature BME 280 I2C component
- Add 2x MapRange component
- Add DISPLAY OLED LCD I2C
- Double click on OLED LCD component and in editor:
- Select "Text Field", drag it to the left and in Properties window set: x to 60 and y to 5
- Select "Text Field", drag it to the left and in Properties window set: x to 50 and y to 20
- Select "Draw Text", drag it to the left and in Properties window set: x to 0 and y to 5 and set text to:"Pressure:"
- Select "Draw Text", drag it to the left and in Properties window set: x to 0 and y to 20 and set text to:"Temp:"
In Visuino: ​Connecting Components
- Connect Arduino I2C pin [in] to PressureTemperatureHumidity1 I2C pin [out]
- Connect Arduino I2C pin [in] to DisplayOLED1 I2C pin [out]
- Connect Arduino Serial[0] pin [out] to DisplayOLED1 pin [in]
- Connect PressureTemperatureHumidity1 pin pressure(Pa) to MapRange1 pin [in]
- Connect PressureTemperatureHumidity1 pin Temperature to MapRange2 pin [in]
- Connect MapRange1 to DisplayOLED1 pin [Elements Text Field1]
- Connect MapRange2 to DisplayOLED1 pin [Elements Text Field2]
Generate, Compile, and Upload the Arduino Code
In Visuino, Press F9 or click on the button shown on Picture 1 to generate the Arduino code, and open the Arduino IDE
In the Arduino IDE, click on the Upload button, to compile and upload the code (Picture 2)
Play
If you power the Arduino Uno module, the Lcd will start showing data about current pressure and temperature.
Congratulations! You have completed your I2C BMP280 sensor project with Visuino. Also attached is the Visuino project, that I created for this Instructable.
You can download and open it in Visuino: https://www.visuino.eu