Raspberry Pi Pico W: WiFi Controlled Robot

Raspberry Pi Pico W: WiFi Controlled Robot

????

Raspberry Pi Pico W robot tutorial, using a Pololu Zumo chassis and L298N, with the robot controlled over WiFi from a local web page. Here you can find the wiring diagram and a link to all code: https://www.explainingcomputers.com/pi_pico_w_robot.html This video is a follow-up to my first Raspberry Pi Pico W video, in which I detailed setting up the board with MicroPython and creating a simple weather station: https://www.youtube.com/watch?v=3q807OdvtH0 The video in which I constructed the Zumo chassis is here: https://www.youtube.com/watch?v=AZSiqj0NZgU And the video in which I demonstrate speed control with an L298N is here: https://www.youtube.com/watch?v=H1PIzxNdGGk You can also learn about writing HTML in my video here: https://www.youtube.com/watch?v=WwNuvGLblJU The excellent Pi Pico W "Getting Started" instructions from the Raspberry Pi Foundation are here: https://projects.raspberrypi.org/en/projects/get-started-pico-w You can download the design for the 3D printed bracket for the Pico W Zumo robot here: https://www.thingiverse.com/thing:5543806 The Zumo robot chassis, micro metal gear motors and L298N motor controller are in this part of the ExplainingComputers Amazon.com store: https://www.amazon.com/shop/explainingcomputers/list/3JMH2RMNMP23A Note that as an Amazon Associate I earn from qualifying purchases when you make a purchase from or via the store. THE PICO'S IP ADDRESS As we saw in the video, the local IP address allocated to the Pico W may change, depending on other devices connected to and active on the local area network. To prevent this from happening you can provide the Pico W with a fixed IP address in your router's control panel. You can also scan to see what IP address has been allocated to the Pico using a free tool such as Angry IP Scanner -- https://angryip.org/ -- I personally use the legacy edition that does not require installation. RE-SETTING THE PICO If during your experimentation you end up with a Pi Pico W that executes a program that you cannot interrupt by pressing Ctrl-C or Ctrl-F2 in Thonny, you can return the board to its factory state by holding down the boot select switch, connecting to a PC, and copying over a special UF2 file to reset the flash. You can find a link to this UF2 file at the bottom of this page under 'Resetting Flash Memory': https://www.raspberrypi.com/documentation/microcontrollers/raspberry-pi-pico.html Note that after execution you will have to reinstall MicroPython. All programs will also be erased. Hence, during program development, it is wise to save your programs on the PC, and of course to keep backups. :) For additional ExplainingComputers videos and other content, you can become a channel member here: https://www.youtube.com/channel/UCbiGcwDWZjz05njNPrJU7jA/join More videos on computing and related topics can be found at http://www.youtube.com/explainingcomputers You may also like my ExplainingTheFuture channel at: http://www.youtube.com/explainingthefuture Chapters: 00:00 Introduction 00:37 Hardware 01:40 WiFi Interface 06:15 Zumo & L298N 10:19 Motor Code & Test 13:56 Final Robot 17:01 Wrap #PicoW #RaspberryPi #Robot #ExplainingComputers

Advertisement

LEAVE YOUR COMMENT

LATEST COMMENTS

@mariamgafar4062 Says:
why did you connect 5V to VBUS and not VSYS
@squeek73 Says:
I made added a full_stop function to set all four motor steps off before turning any of them on - can't go both ways at once. I also made a few changes to your HTML. I don't do social media, and don't know how else to share it, so here it is: PICO W Zumo Robot by Christopher Barnatt
PICO W Zumo Robot
by Christopher Barnatt
@ANDYW031084 Says:
Hi I have a question , if I upload this code to raspberry 4 this car should work too ? Or might be a different code need to be written ? Thank you
@arnavsharma3471 Says:
Does both the tablet and pico need to be connected to same internet connection? What is its range?
@harshitainamdar2820 Says:
We're choosing this project for our college competition can you please tell me what are the current specifications? Please let me know asap....
@animewaale7607 Says:
i got import error: no module found 'network'
@brianhambleton9309 Says:
Thanks Chris!
@amazingjana Says:
I really love how this is explained in a way that I can understand it! Can I use this tutorial on other robots?
@Videogame9559 Says:
❤😂 good morning great little sumo project.
@Videogame9559 Says:
This just what I needed control an old rc that has no control board and no controler bought form charity shop cheap it's going to be fun getting it going .
@arnavsharma3471 Says:
Can we use a raspberry pi camera with this?
@kdt85 Says:
this is an excellent video, would you happen to have a video where you create a slider on a webpage and control something from the pico, perhaps a servo? thanks
@Praxibetel-Ix Says:
Hey, this ain't the NVIDIA JETBOT video! 🤪
@mystery_1101 Says:
Hey can we make this in the esp32?
@AnimalStomper Says:
I have created the exact same robot, even had a roll of red filament for my housing. Is it possible to have it use keyboard commands instead of the web interface?
@deepsleep7822 Says:
Respectfully, I’m Impressed with the response time. It executes the commands almost immediately. Good job.
@mihailvormittag6211 Says:
👍
@tomcaton8932 Says:
Putting the WiFi credentials in a separate file makes it easier to run the code at a different location.
@itsskyballs Says:
I'm really concerned about the controls You must need to edit the code again and add a keyboard controls then the stop will be the enter button idk what im sayin rho
@andrewmetz2008 Says:
When I run the test code for the WiFi interface, it just continuously says “waiting for connection…” and never actually connects or gives me the ip address. Could you help me with this.
@jacobob2967 Says:
Would the PicoWon the robot be able to be controlled by by another PicoW connected to physical buttons? To serve as the wireless controller and the receiver? I’m wondering if the web interface can be cut out so it could be used outdoors.
@savcacristian1333 Says:
can you please help me? AttributeError: module 'network' has no attribute 'WLAN'
@critical_always Says:
Micropython. That is not programming.
@jcork3460 Says:
Chris, can you set the WiFi to be an access point so that you can take the robot away from home WiFi?
@picobotsUK Says:
Many thanks. This is an excellent tutorial that helped me develop my WiFi controller + WiFi Rover which circumvents the use of a webpage interface. Things will get really interesting when RPi unlock the BT on the Pico W, and I look forward to your update when this happens!
@rogueaspect2600 Says:
What if I had four motors would I need two raspberry Pi pico w and alter the code a bit to make it work the same or do I need to do something else
@JohnDoe-ef4uj Says:
Hi, i have the chassis, motors and motor drive controller purchased and have my pi zero w. Just wondering what other components i need that might not be listed. Not sure if the switch you have on the robot is listed in the hardware or any other hardware i need for this project. Thanks
@adamward9310 Says:
I love your videos!! Especially when you start with... "Right..." I find myself saying it with you.
@JohnDoe-ef4uj Says:
Hi, can you provide the files for the 3d printed bracket so i can do the same one, thanks
@rahularyan2258 Says:
Is there any way we can add a camera module like esp32-cam with this project?
@rohankeenoy2199 Says:
I am a computer science major with an interest in robotics and engineering. These videos are incredible. Thank you.
@jimcraig5727 Says:
Great little project Chris, have had fun making the original design & then making some changes. Replaced the L298N motor board with the more efficient TB6612FNG. Changed the code to include speed control, primarily to slow the turns and add timing to make 90 degree turns. Added an led & coding to indicate when the robot is connected to the server. Added some styling to improve the appearance of the Control & to include some more buttons for future addition of programable leds
@rickbonari4493 Says:
Hello Christopher, I am playing around with the html file for this project and it is quite fun !!!!! I do have one qustion tegarding the html code. I see an ending body tag () but no beginning body tag (). Is this normal? Seems the beginning body tag should be after the head ending tag (). Would this be correct and what is the reason for no beginning body tag. Thanks much and learning lots from your videos. I am having more fun with this little robot.
@MrLexhoya Says:
Did you reverse the left and right combinations in your code? In the breadboard section it seemed as if it was reverse for l/r.
@arjjunmunisamy2601 Says:
Sir can you please explain the connection between the negative end of the battery and gnd of the pico attached together
@steelfalconx2000 Says:
OMG I've been watching this channel for years and never knew you had an Amazon store. Gonna check it out!
@flemlion13 Says:
When programming, I often have a healthy dose of paranoia and in that vain I would change the setForward implementation to first set back to 0 and do the set to 1 afterwards. Avoids both being 1 at the same time even with interrupts or crashes.
@jackyli6716 Says:
very cute..haha
@rickbonari4493 Says:
Hello Christopher, I am making progress. Have robot built and was successfull in loading micropython onto pico w. However when I open up Thonny 4.0.1 Thonny recognizes Micropython (Raspberry Pi Pico- com3). However in the Thonny Shell it states unable to connect to com3: port not found. The connection to the usb must work otherwise I wouldn't be able to download micropython to the pico w? I have checked on the internet with no luck. I am wondering if you have any thoughts on this? Thanks much....Rick
@rickbonari4493 Says:
Hi Christopher, I'm not finding the pico w uf2 file on the site you referenced to download it from. The page has completely changed and I'm not able to find the main pico w uf2 file. Any suggestions? Thanks much....Rick
@sovereignlivingsoul Says:
great video, i am thinking of using a pico and two motors to operate as positional indicators for a gps and a dht11 sensor module, thanks for showing how the wifi could be useful
@_tr11 Says:
Thanks for the video! Very easy to understand. 😄
@rickbonari4493 Says:
Hi Christopher, Just a quick suggestion. If you would do videos on robots and programming with micro python and python as well as html more frequently I think this would increase your subscribers greatly. Also other projects like your weather station, etc. Would help if they were done more frequently. Just a suggestion and I think your work is great and love your channel !!!!! Rick
@rickbonari4493 Says:
Hi Chris, I found a zumo robot from the robot shop usa. However, I found that the single battery holder clips didn't have a slot to fit into like the other three clips did to hold them in place. Was your kit the same way? If so how did you get around this. Also interested to hear if your chassis had a way to mount these single small battery clips (2) or not? Thanks much !!!!!
@charliebray8415 Says:
Please make a video on how to communicate between a raspberry pi and a pico. I've been trying to do uart for a week now and it is kicking my butt.
@quarteratom Says:
Temporary prototype.
@anwerhayat.hayathayat8266 Says:
I know
@ravenmadd1343 Says:
Whoo Hoo, I won something .... not. I'm guessing this is not your Chris but just so that you're aware .... https://www.youtube.com/channel/UCxJdTzux-_qb1qAhkNXrTfw
@JanVaskoSG Says:
ty bruu <3
@x2uolx2uol63 Says:
Hi, Would you please explain an old lady how to connect a printer with a rasberry pico w. All I want is being able to print with a PC but also with my ipad and iphone…. Also I’m french speaking so please don’t go to fast.

More Programing Videos