Category Archives: Arduino

Measure Altitude with an Arduino Project

In this video lesson I show you how you can create a project for measuring altitude using an arduino and a BMP180 Pressure Sensor. We go through the physics, math, circuit and coding to make this project work. For our example, we are using a GY-87 module, which has a BMP180 sensor on it. If you are using a BMP180 sensor directly, it should work the same. For your convenience, this is the circuit schematic we will be using:

BMP180
Schematic for connecting the GY-87 module to the Arduino

For your convenience, the code we developed in the video lesson above is included below. Enjoy!

 

Measure Air Pressure with the Arduino and BMP180 Pressure Sensor

In this video lesson we explain how to use the BMP180 to measure barometric pressure and temperature. We explain basic concepts of what pressure is, and we show how the BMP180 measures pressure. The circuit schematic we use is shown here:

BMP180
Schematic for connecting the GY-87 module to the Arduino

For your convenience, this is the code we developed in the video for measuring Temperature and Barometric Pressure.

 

 

Arduino Project for a Portable Ultrasonic Distance Sensor

Distance Sensor Project
Distance Sensor Project Build

In this video lesson we create a portable distance measuring prototype, using an Arduino Uno R4 WiFi. This project incorporates a HC-SR04 Ultrasonic Sensor, a ‘Go’ button, and the SSD1306 OLED Display. The project is powered by the Sunfounder Breadboard power bank. The arduino is powered by the power bank as well, so the project can operate totally portable. When the device is turned on, the OLED prompts the user to position the device. When the ‘Go’ button is pushed, the device measures the distance to the target, then displays the distance on the OLED display.

The video above gives all the details of the project, with step-by-step instructions.

Distance Sensor
Portable Distance Sensor with HC-SR04 and SSD1306 OLED Display

For your convenience, the code developed in the video is presented below. Enjoy!

 

 

Using the SSD1306 OLED With an Arduino

In this Video Tutorial we show you how to incorporate the SSD1306 OLED into your Arduino project. This is a versatile, low power display that makes it easy for you to incorporate a nice display into your Arduino projects. For this project, we connect the OLED via I2C. The schematic for our project is presented below:

SSD1306 OLED
SSD1306 OLED

Our physical build looked like this:

I2C SSD1306 OLED

The video above shows in depth description of the code development, but for your convenience, we include the code below.

 

Scan Arduino to Find I2C Addresses

I2C SSD1306 OLED

A challenge in many Arduino projects is that it can be difficult to get I2C components working properly. Many times the libraries and demonstration code indicate a certain I2C address for the component, but the Arduino is unable to find the component at that Address. This can be a challenge, because often times we might not have the exact same version of the component that is assumed in the libraries and code. A perfect example of this are the SSD1306 OLED displays. Many of the components look identical, but they can have different I2C addresses. In order to overcome this challenge, the following code allows you to scan your I2C Bus, and list the address of all the components found. Simply attach the component as instructed in the component documentation. Then run the following code. It will list the address of the I2C components it finds. Then you can edit the sample code to use the proper address. Enjoy!