Add an MPU6050 Accelerometer to your Arduino Project

In this video lesson we will show you how to incorporate accelerometers into your Arduino projects. Your Sunfounder kit includes the GY-87 IMU module. This module contains a BMP180 pressure sensor, which we have already used in earlier lessons, and an MPU6050 6 axis IMU. The MPU6050 includes 3 accelerometers and 3 gyros. In today’s lesson, we learn how to use the MPU6050 accelerometers. I will explain how these MEMS bases accelerometers work, and how we can use them in our project.

This is the schematic we use in todays lesson.

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

For your convenience, the code developed in the lesson is presented below:

 

Getting Latitude and Longitude from the Adafruit Ultimate GPS with Raspberry Pi Pico W

 

In this video lesson I show how to get usable Latitude and Longitude from the Adafruit Ultimate GPS version 3 using the Raspberry Pi Pico W. We read the NMEA sentences from the GPS, we parse them into individual strings for each sentence, and then we create arrays of data from the strings. Then we begin to parse the arrays, and convert the confusing numbers into useful Decimal Degree values for Latitude and Longitude.

Pi Pico GPS
This schematic shows how to connect the Adafruit Ultimate GPS to the Raspberry Pi Pico W

For your convenience, this is the code we developed in todays lesson:

 

Controlling Brightness of Arduino LED Remotely Using PyQt and WiFi

In this lesson we will use PyQt5, UDP and WiFi to control the brightness of an Arduino LED circuit remotely. The PyQt generates a constantly updating sin wave, which it plots on a PyQt graph, and then transfers the brightness in real time to the arduino project. This lesson teaches many important skills including UDP, WiFi, PyQt5, Python, Arduino and LEDs.

When using the breadvolt, or any battery power supply on a breadboard project, do not turn the power supply on while the Arduino is connected to USB, as you could generate voltage conflicts. It is an either or. If the USB is connected, the power supply should be OFF. The schematic for the arduino circuit is shown below:

Schematic of our Arduino Uno R4 Wifi connected to an RGB LED

In the video, we develop code for the server, on the arduino, and the client, running in Python on the desktop. We present the code below for your convenience.

This is the Server code for the Arduino:

You will need to open a new tab, and save the following code as “secrets.h” with the program above.

On the Python side, this is the Client code:

 

Plot Live Data in Python Using PyQt5

In this video lesson we show you how to plot live data in Python using PyQt5. In this lesson, we generate the data in python on the fly, but in future lessons we will bring the data in from the Arduino Project over WiFi using UDP. For your convenience, the code we developed in this lesson is below:

 

PyQt5 Project to Control Arduino RGB LED Over WiFi

In this video lesson we add slider bars to our PyQt Widget allowing us to control the color of an RGB LED over WiFi. When using the breadvolt, or any battery power supply on a breadboard project, do not turn the power supply on while the Arduino is connected to USB, as you could generate voltage conflicts. It is an either or. If the USB is connected, the power supply should be OFF. Or if you are going to connect the USB, first turn off the power supply. The schematic for the project circuit is shown below:

Schematic of our Arduino Uno R4 Wifi connected to an RGB LED

The server side code developed in the video is presented below:

Remember to add the secrets.h file by adding a tab to the project, as explained in the video.

And then on the client side, we have the following code:

 

Making The World a Better Place One High Tech Project at a Time. Enjoy!