Category Archives: Raspberry Pi Pico

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:

Ultrasonic Sensor
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:

 

Precision Ultrasonic Distance Measurement With PIO State Machines on Raspberry Pi Pico W

In this video lesson we will show you how to get precise distance measurements with the HC-SR04 Ultrasonic sensor. We show how measurement stability and accuracy can be improved by using the Raspberry Pi Pico PIO State Machines to trigger and monitor the sensor. For your convenience, the code is presented below.

 

Measure Distance Using the HC-SR04 Ultrasonic Sensor on the Raspberry Pi Pico

In this Video Lesson I will teach you how to use echolocation to measure distances. We will use the HC-SR04 Ultrasonic Sensor, and will use the Raspberry Pi Pico W. We will explain how echolocation works, and show you how the sensor works. We will do the math, and then create the code for making measurements.

 

Controlling NeoPixel Array on PIO State Machine on Raspberry Pi Pico

In this video lesson we show how neopixels work at a fundamental level, and show how you can use the Raspberry Pi Pico State Machines to control the neoixels. Neopixels are an excellent example for showing the importance of the pico state machine. The neopixels demand precise timing and sequence of bits to operate properly, and that precision can not be achieved in python. The video explains how the State Machines can be programmed to control the neopixels.

For your convenience, the code is included below.

 

Raspberry Pi Pico PIO State Machine IRQ Interrupts and Handlers

In this video lesson we learn how to use and handle multiple IRQ interrupts using the Raspberry Pi Pico PIO state machines. We demonstrate this by using 3 LEDs, controlled by three separate buttons. We show how to set, clear, and wait on IRQ interrupts. We show how to use blocking and no blocking interrupts. In this video lesson, we use the following circuit.

Interrupts
Circuit Schematic for Button Control LED Interrupts

For your convenience, the code we develop in the video is presented below.