Category Archives: Raspberry Pi Pico

Remotely Control a DC Motor Over WiFi With Raspberry Pi Pico W

In this video lesson I will show you how you can control a remote DC motor using your Raspberry Pi Pico W. The Pi Pico is set up as a server, and is connected to a DC motor, and TA6586 Motor Controller. The motor is controlled by a client Python program running on your desktop PC. On the client side we create a Graphical Widget, which will allow you to control both the speed and direction of the motor. the schematic for the Raspberry Pi Pico W side is shown below:

Motor Controller
Schematic for TA6586 and Raspberry Pi Pico DC Motor Control

Then in the video, we developed the following software for the server side on the Pi Pico

Then for the client side, the following program runs on Python on your PC:

 

 

Control DC Motor With Raspberry Pi Pico W and TA6586

In this video lesson we show you how you can control a small DC motor using the Raspberry Pi Pico W and a TA6586 DC Motor Controller. We show you how to control both the speed and direction. The schematic for the circuit we use is here:

Motor Controller
Schematic for TA6586 and Raspberry Pi Pico DC Motor Control

In the lesson, we developed the following code for your convenience:

 

Plotting Live Data in Python Using PyQT

In this video lesson we show how Live Data can be plotted using a PyQt window. Our eventual goal is to bring in live data from the Raspberry Pi Pico W using UDP over WiFi, but to learn the concepts today, we will be generating a live sin wave to show how the plotting works. Here is the code we developed in this lesson:

 

Simple Client Server Project for the Raspberry Pi Pico W

In this video lesson we demonstrate a simple client server project on the Raspberry Pi Pico W. The Pico is configures as the server, and your desktop pc or laptop is configures to be the client. You will be running python on your PC. The project requests the user on the PC to specify a desired color. The color is then sent to the Pico, the Server. Then the Pico sets that color to ‘ON’. The pi pico is powered by a breadboard power bank, and there is no need for any connections to the pico. You can pick up the breadBoard Power Bank HERE [Affiliate Link]. Below is the schematic for the Server Side of the project:

LED and Buttons
Schematic for Circuit to Demonstrate a Client Server Example on Pi Pico

For your convenience, this is the code we developed in the video

Remember you must create a secrets.py file, and save it on the Pi Pico in the lib folder. You need to specify YOUR WiFi name and password in the file.

And finally, here is the code to run on the client side on your PC

 

Sending Data Over WiFi Between Raspberry Pi Pico W and Your PC

In this video lesson we show how we can send and receive data between the Raspberry Pi Pico W, and your PC. We will be running python on the PC, and we will exchange data using the UDP protocol. UDP is simple, and a very reliable way to send data packets back and forth. In this example, we will be demonstrating a simple Client Server relationship between the Pi Pico and PC using UDP over WiFi.

In this lesson, we will just be showing simple exchange of data, but in preparation for future lessons, go ahead and build this circuit.

LED and Buttons
Schematic for Circuit to Demonstrate a Client Server Example on Pi Pico

For your convenience, this is the “Server” software you will run on the Pi Pico.

Notice that the above code wants to load a “secrets” file that contain your WiFi name, and password

You should edit the code below with your WiFi username and your password, and then save the file in the Pi Pico lib folder, with the name secrets.py (don’t forget the .py)

Now, on the PC side, you will run your client, which will be run in Python. Here is the client software: