Tag Archives: SSD1306

Portable Distance Measurement Project With HC-SR04 Ultrasonic Sensor

In this video lesson we explore creating a portable distance measurement widget using the Raspberry Pi Pico W, the HC-SR04 Ultrasonic Sensor, and the SSD1306 OLED display.

The schematic we use for this project is as follows:

Schematic for Portable Distance Sensor Project

In this work, we use the State Machines on the Pi Pico to ensure precise timing. Below, we include the code developed in the lesson above:

 

Arduino Project for a Portable Ultrasonic Distance Sensor

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.

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

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.