All posts by admin

Sweeping Servo Position Using the PIO State Machine on the Raspberry Pi Pico PIO State Machine

 

In this video lesson we show how you can use the Raspberry Pi Pico PIO State Machine to sweep a servo through its full range of motion. The video will take you through things step-by-step. For your convenience the code developed in the video is included below. Enjoy!

 

Control Servo Position Using a Raspberry Pi Pico PIO State Machine

 

In this video tutorial we show you how you can use a Raspberry Pi Pico PIO Statemachine to control the position of a servo. For your convenience, the code from this lesson is presented below. Enjoy!

 

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!

 

Arduino Tone Frequencies to Produce Specific Musical Notes

The arduino connected to a passive buzzer can actually be used to create simple music. In order to do this, we need to know the frequencies associated with specific notes. The code below can be used to directly write musical notes to the arduino tone command. This will be covered in an upcoming lesson. Enjoy!

 

Arduino Program to Average and Sort Grades

In this video lesson we show how to create a program that will input a list of grades, sort them into descending order, average them, and then find the high and low grades. This is a classic first year college programming assignment. We take you through it step by step. For you convenience, we include the code below.