Atmospheric Pressure Measurement Using XinaBox XChips

Introduction: Atmospheric Pressure Measurement Using XinaBox XChips

Create a project that measures the atmospheric pressure in under 20mins using XinaBox xChips.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Things Used in This Project

Hardware components

  • XinaBox SW01 x 1
    xChip Temperature, humidity and atmospheric pressure sensor based on the BME280 from Bosch.
  • XinaBox PU01 x 1
    xChip USB (Type A) Power Supply
  • XinaBox IP01 x 1
    xChip USB Programmer based on FT232R From FTDI Limited
  • XinaBox OD01 x 1
    xChip 128x64 Pixel OLED Display
  • 5V USB Power Supply x 1
    Power Bank or similar product
  • XinaBox XC10 x 4
    xChip Bus Connectors
  • XinaBox CC01 x 1
    xChip version of Arduino Uno based on ATmega328P

Software apps and online services

Step 2: Story


I built this project to measure the atmospheric pressure in my location with the SW01 multi-functional sensor. It can measure temperature, atmospheric pressure, humidity and altitude. I've used an ATmega328P based xChip, the CC01, coupled with the sensor and an OD01 OLED display to complete the project.

Step 3: Download Necessary Files

You will need the following libraries and software:

Click here to see how to install the libraries.

Once you've installed the Arduino IDE, open it up and select the "Arduino Pro or Pro Mini" as the board to upload your program to. Also make sure the ATmega328P (5V, 16MHz) processor is selected. See image below.

Select the Arduino Pro or Pro Mini and the ATmega328P (5V, 16Mhz) processor

Step 4: Assemble

Click the programmer xChip, IP01, and the ATmega328P based CC01 xChip together using XC10 bus connectors as shown below. In order to upload to the CC01 you'll need to place the switches in the 'A' and 'DCE' positions respectively.

IP01 and CC01 clicked together

Next, combine the sensor, SW01, and the OLED display, OD01, as shown below. Simply click them together. It's impossible to get it wrong.

Assembly in order to program

Step 5: Program

Insert the unit into the USB port on your computer. Download or copy and paste the code below into your Arduino IDE. Compile and upload the code to your board. Once uploaded your program should start running. You may read the comments within the code to grasp the syntax. The below image shows the atmospheric pressure once the upload has completed.

Observe the atmospheric pressure once you've uploaded

Step 6: External Power Source

Remove the unit from your computer. Disassemble the unit and reassemble it using PU01 instead of IP01. See below.

Final assembly not powered up

Now take your 5V USB portable power supply such as a power bank or similar and insert the new assembly into it. You can now observe the atmospheric pressure on the OLED display and measure the pressure in any location.

Complete project powered on

Step 7: Conclusion

This project took under 10min to assemble and another 10min to program. The xChips just click together making it very convenient.

Step 8: Code

Pressure_display.ino Arduino
Simple code to indicate atmospheric pressure on an OLED display.

#include <xCore.h>    // include core library for xCHIPS
#include <xSW01.h>    // include pressure sensor library
#include <xOD01.h>    // include OLED display library<br><br>xSW01 SW01;

float atm_pres;       // variable containing the pressure

void setup() {

  // put your setup code here, to run once:

  // initialize pressure variable to 0
  atm_pres = 0;

  // start i2c communication

  // start pressure sensor

  // start OLED display

  // clear display

  // delay for normalization

void loop() {
  // put your main code here, to run repeatedly:

  // read pressure constantly

  // retrieve pressure and store it
  atm_pres = SW01.getPressure();

  // print pressure on OLED display
  OD01.print(" ");

  delay(5000);    // update display every 5 seconds

Be the First to Share


    • LED Strip Speed Challenge

      LED Strip Speed Challenge
    • Sculpting Challenge

      Sculpting Challenge
    • Clocks Contest

      Clocks Contest