Tag Archives: OLED

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!

 

Two Axis Tilt Meter Displaying Pitch and Roll Using an MPU6050 on the Raspberry Pi Pico W

In this video lesson, we demonstrate how to create a two-axis tilt meter. The device displays both the pitch and roll on an OLED. In addition to this quantitative display of tilt and roll, it also shows a carpenter’s level type visual, where a circle, or bubble moves to indicate tilt. When the circle is centered on the crosshairs, the device is flat in both axis.

For your convenience, this is the schematic we are using:

MPU 6050
Schematic for Creating a Tilt Meter

And we also include the code we developed in this lesson.

 

Raspberry Pi Pico W Mobile Weather Station Project

In this video lesson, we create a mobile sensorless weather station. This is a follow on from our earlier lesson, and with this class, we add a rechargeable LiPo Battery, and an OLED screen. For your convenience, we show the code below that was developed in this video.