Pi Pico W with the Arduino IDE | Using WiFi
Тәжірибелік нұсқаулар және стиль
Use the new Pico W with the Arduino IDE instead of microPython!
Article with code: dronebotworkshop.com/picow-ar...
More articles and tutorials: dronebotworkshop.com
Join the conversation on the forum: forum.dronebotworkshop.com
Subscribe to the newsletter and stay in touch: dronebotworkshop.com/subscribe/
On June 30, 2022, Raspberry Pi announced the latest iteration of it’s RP2040-based Pico microcontroller. The Pico W has the same pinout and form factor as the original Pico and has WiFi capabilities.
Raspberry Pi also released a new UF2 file and several samples using microPython with the new WiFi chip. However, although they did release a C++ SDK, there was no update to the Arduino IDE for the new microcontroller.
But you CAN use the Pico W with the Arduino IDE by using a new boards manager file that covers virtually every RP2040-based board. And today, I’ll show you how to install that for the classic Arduino IDE 1.8 and the newer IDE 2.0.
After installing the new boards manager, we’ll give it a test. Then we’ll see how we can use the new WiFi features to control LEDs and servo motors with a web-based interface.
Here is the Table of Contents for today's video:
00:00 - Introduction
03:25 - Raspberry Pi Pico W
08:05 - Bluetooth issues?
10:55 - Pico W vs. ESP32
13:35 - Installing the Boards Manager
18:22 - Blink test
20:48 - WiFi Network Scan
23:10 - Using the WiFi Library
28:07 - Using Web Data
30:56 - Pico W LED Control
37:43 - Pico W Servo Control
47:28 - Conclusion
The Arduino IDE is a popular interface for programming microcontrollers, and now we can use it with the Pico W.
Hope you enjoy the video!
Bill
Пікірлер: 126
Hi everyone - It's come to my attention that there has been someone masquerading as myself, responding to some comments here with a link to a Telegram chat to win a prize from me. THIS IS A SCAM, I am not holding a contest, nor do I have a Telegram account. PLEASE DO NOT RESPOND TO THESE MESSAGES!! It's happening on a lot of my videos, I'm taking steps to remove them manually, but as I have 162 videos, it will take some time. If you do run across a suspicious comment, I would appreciate you letting me know at info@dronebotworkshop.com. Thanks! Bill (The real one!)
Hi BILL - thank you for taking care of EARLE PHILHOWERS Software-Masterpiece - the Arduino -PICO-CORE- which is covering all the special functions of the PICO. In the old IDE 1.8.19 it is running reasonably stable , but in the new IDE 2..0 i often have upload-problems and the procedure is very slow. BUT there is good news : The PICO EARLE PHILHOWER-version is now ( since a few days ) running in VSC-PlatformIO without any problems and we have all the benefits of a modern Software-Developement-system in the Arduino environment. I hope, this will not be your last video on this magnificiant new board . One idea would be to cover the advanced PICO solutions of the tft_eSPI library of the " library artist" BODMER . Greetings from germany .
Thank you once again for such excellent content, so professionally put together, comprehensive, articulate and right up to date.
Thank you for a beautifully clear and excellent tutorial. Now I can use my Pico w.
Again, a very nice video. I’m always enjoying your videos. Thanks Bill.
I bought a Pi Pico, and 3 days later the Pi Pico W came out!! *DAMN IT !!!!!*
Really enjoyed this. Look forward to seeing you use the Pico W in more videos.
Your channel is my best discovery of 2022. Great work
Yay. Excited for this video. Love the Pico W. Thanks, Bill!
Yet another outstanding video. Many thanks for sharing Bill 👍👍👍
Another excellent video, as always. Thanks Bill.
Thank you for this video.. I wanted to test the Raspberry Pi Pico and I did not want to set up another IDE to do it. This was great. Thanks again
Thanks for the tutorial! I am new to the pico (and Raspberry PI), but having extensive experience with Arduino microcontrollers this makes it easier for me to wrap my head around it. :)
thank you very much for your excellent work. your videos are really very educational and allow those who are beginners as well as others to follow you well. thank you !
Very good video and information. 👍 Here in the UK the Pico W sells for £9 including shipping and the ESP32 , £4.35 shipping included - from China.
I love your long form videos. thank you so much
Thanks for your advice and excellent suggestions.
Thank you for the great video. I love writing code in Arduino, so this is right up my alley
In my opinion, the ONLY reasons to choose a Pico W instead of an ESP32 are: 1. The very minor price savings if you absolutely don't need any of the ESP32's better features. Or 2. Your going to make use of the awesome PIO feature of the Pico and you need WiFi.
Thank you for understanding the concept in-depth.
Hi Bill, You say at 1.32 the other videos on the tubes did not leave you much to cover? This being said, your videos are so much more informative and explain in such detail, it leaves very little that needs to be answered. The 1st video I ever watched of yours was (in my mind) too boring... but, once I got through it, I was in awe and realized WHY there was so much information and even went back to start it again. You're one, if not in my mind, of the best tutors on the tube's Bill. I hope that we see more videos on the Pi Pico W
thank you very much for the video. I got my pico blinking in 20 mins following the clear instruction. I still decide to go back to python, for it's real time REPL, which is much more user friendly for someone like me who knows very little about coding. I can actually type and run code like in terminals. I can understand c++ code may run faster and less resourceful than python. Until one day I may code a project really cooks the pico W with python, then I will be able to come back here and try to get used to the code-compile-upload-execute cycle. Great video!
Very thorough video, many thx. What would be very useful would be a simple technique to help us avoid hard coding SSIDs and passwords into programs. Meanwhile please keep up the great work 😀👍
Thank you for your concise information and teaching.
Excellent video! Thank you!
Great video. Good motivations for why you may want to use C and/or Arduino IDE: - familiarity - speed - mature 3rd party drivers and samples for legacy peripherals And I would add: - because I simply don't want to use Python in any environment ever (my reason? I don't need one)
I got my first Pico after they released the SDK - in March of 2022. I didn't even look at Micro/CircuitPython :). I've recently been doing a lot of AI work with TensorFlow, so I'm more comfortable in Python. I recently gave CircuitPython a try and it wasn't half bad for non-time critical tasks. I'm still way more comfortable with C++ (20+ years experience vs about 2 years experience in Python).
Thanks for this video! I thought my Pico W might have been broken when I couldn't get blink working. I was unaware of the different pin for the onboard LED.
As usual, excellent content! As concerned to windows versions, they share same folder (Arduino15) so packs become available in both versions. Apparently, linux versions work in same way.
I love your channel! Usually, whenever I have a new sensor, and I want to use it with an arduino, I head straight to you. In fact, I was doing so right now when I noticed you don't have any vids for RFID. Please make one, and keep up the amazing work!
You make life on a starter on the Pi pico W really easy. Thanks again!
So nice , thank you for the great video
EXCELLENT VIDEO. THANK YOU!
Another great video. Keep up the good work 👍
The reason that I'm looking into the Pico over the ESP32 is analog to digital conversion (ADC). The ESP32 has a known inaccuracy in its adc where the value can be off by as much as 6%. Worse is that the error varies board by board, so compensating is virtually impossible. I've tested the Pico's adc and found it to be accurate within 1%. Fortunately, I only need 3 adc inputs, so the Pico should work just fine.
@requiem4adreamc
Жыл бұрын
This is horrible news! I want to make a diy gamepad with 2 analog joysticks with esp32.
Most ESP boards I've used (D1 Mini and NodeMCU) only have 6 completely free and usable GPIO pins, with several others being usable with restrictions like being high or low at boot or being serial RX/TX pins also. This is far too few for many projects and I've found myself using an Arduino and sending wifi commands over serial to the ESP board so I can take advantage of more IO pins. I ordered the Pico W as it appears it has more free pins, more like an arduino with wifi.
Great video to know the pico W
Nice tutorial! One more advantage of the RP Pico is that it has PIO with DMA which is a great feature:) Using the native Pico SDK would be even faster than Code generated by Arduino IDE :). I still prefer ESP32 family tho :d
Excelent video - as ussual perfect job. Thank you very much
Thank you for you great info, on how to run the Picow in the Arduino IDE
It’s like the Pico W design folks looked at the ESP-32 and asked themselves, _”How can we make a board that does _*_HALF_*_ as much?”_
Thanks for your amazing contents, I always thought building and programming a robot is an impossible task. ❤
Thanks for all your work in creating this video. FYI - In your LED Control code, the WiFiServer.available() function has now been depreciated and throws an error, until you replace it with the .accept() function. Hope this helps 😎 Edit: This also affects the Web Servo Control code.
Great Job!
If you have issues with uploading do this: tools > port > then select one of the ports
Hi Bill, a great episode, and add to the list of why not use python if you are a fan of Arduino IDE, and you may not be inclined to learn yet add another language, although it has its pros and cons, as you mentioned. One reason to buy (for professional use) the new Pico W versus the ESP32 is the source and version of ESPs are very fuzzy unless you stick with a trusted vendor like Expressif or Unexpected Maker. Cheers.
at last! thank you!
Great video.
Wish I had him as my electronics teacher at uni.
Greatings from France. I was interested by pico, specially for Wifi capabilities. I have programs for Arduino nano in C langage but now I can simply translate them for pico if I want to add Wifi capabilities. Thanks. I have subscribed to your channel.
Good video.
I've been waiting to get my hands on a Pico-W since they were announced. Both SparkFun and AdaFruit are regularly sold out. Where are folks finding this unicorn?
@leglessinoz
Жыл бұрын
Pi Hut maybe
Hey Bill ,absolutely love your videos. They are great for hobbyists like me, just dipping their toes in the water. Can you please make a video on using micropython with the ESP32 as the ESP32 does support micropython so it might be interesting to see it being used with micropython
The best of the best!!!
Hey, I am watching your videos for a while now. I was wondering if you could do a series of lessons for microPython.
will you be doing a video on the sparkfun RTK GPS modules and how to use them with arduino? it was mentioned in your GPS video that you would do a seperate video on that technology.
A very good video, thanks! What is the best solution to power the Pico W from a battery? 18650 or AA batteries? How many volts should the battery have to last the longest? I will use a temperature sensor that draws very little current.
Can you make an over current,under current,under voltage protection using WCS hall effect sensor ,Voltage sensor (maybe ZMPT101B AC Single Phase voltage sensor ), 5V Relay with I2C 128x64 OLED display (SSD 1306) ,Arduino Uno For AC loads (Pool pump in my case ) this kind of protection is really helpful. I hope that with some thinkering we can use the under current for motor dry run protection . I actually bought all the mentioned components but i can't get it to work . Obviously am a bit new to adruino . It would have been very helpful if you could make the same 😊
Thanks for the video! So given your comment that the board only seems to operate in station mode do you think that means WifiManager won't work? Haven't been able to get one yet so can't try it.
Great video! Now that the Pico W has Bluetooth/BLE capabilities, could you make a video on using them?
Have an ESP6266, checks if WiFi is available (if not deep sleep, hour), checks if MQTT broker is available (if not deep sleep, 15 minutes), reads sensor, send data to MQTT then deep sleeps for 15 minutes then repeat. BIG QUESTION: Can the PICO W consume less power than the ESP6266. Its on a battery and connected to a small solar panel. MQTT broker is a Rpi. Both the Rpi & WiFi are off at night when I sleep.
@johndevires5911
Жыл бұрын
Is the ESP6266 a new model? I have only seen the ESP8266.
Any chance to see NavSpark products mentioned? They seem to be good choice when one needs high acurracy GPS position for arduino, they have arduino nano like dev boards too. Unfortunetlly not many resources on those.
Bill, Thanks for a great video. With my pico w and arduino IDE 1.18.13, I have to reset the pico each time I upload. Any thoughts what I've got set wrong?
Thanks!
@Dronebotworkshop
Жыл бұрын
And thank you as well, Harry!
Thanks for another great tutorial! As with any insignificant pronunciation slippo, there's always some smartass to point it out. As I am working for that company, lemme do the honors this time: For "Infineon" (the producer of the Wifi chip on the Pico W) cut the "ity" from "Infinity" and add a "neon" - or listen to it named here: kzread.info/dash/bejne/pKSKmcqEmMKwhsY.html And please take pride in the quality and thoroughness of your videos if folks have to go to such great length to find something to criticize ...
in your comparison between the pico w and ESP32 you might mention that the ESP32 allows for access point
One problem with the ESP32 is the quality and consistency of boards varies all over the map, and the documentation is not the best. The Pi Pico has great documentation and the hardware is consistent.
@noweare1
Жыл бұрын
I would think the boards made by espressif would all be high quality.
Hi Bill, thanks for your video. Your videos are great. But something remains unclear to me. when I upload the program into pico, the microcontroller's USB is disabled and the serial monitor does not work. Please explain how you did to open the serial monitor?
I cannot send a message in the forums yet, So, Bill, Please, What program do you use to show your wiring diagrams? It is clean and I need to design some wire management. Thanks. Great videos
Useful information well presented. However the ESP32 comparison is a bit tendentious. The PicoW has four cores total, two M0 in the 2040 and the M3 and M4 in the CYW43439 as well as the unspecified amount of SRAM and ROM in the Wifi chip. Sure these are not available to run user code, but looked at that way, some of the resources of the ESP32 are used by the radio stacks and are so also not available to run user code. A power consumption comparison would be illuminating however and I suspect ESP32 has the edge there.
very nice work as usual keep the good work up .. i do need to know something if it possible how i can connect esp32 to my running web site ? i have website published and working and i do need to send some data from esp32 there but i could not setup client in the website to receive data from esp32 or send to it i tried to use mqtt but the problem is most of is the mqtt require ssl and i do not know to set that up
Bill, is there a reason you haven't upgraded to *1.8.19 ?* I noticed at 27:40 that the *time* when *pinging* is all over the place!
But the servo is only turning 90° at 40:49, or did I understand something wrong?
"Standard USB has a minimum rated lifetime of 1,500 cycles of insertion and removal, the mini-USB receptacle increases this to 5,000 cycles, and the newer Micro-USB and USB-C receptacles are both designed for a minimum rated lifetime of 10,000 cycles of insertion and removal." from Wikipedia.
@tin2001
Жыл бұрын
Of course once the Chinese companies start making their own little tweaks to the designs, all those numbers are meaningless.
@tin2001
Жыл бұрын
Of course once the Chinese companies start making their own little tweaks to the designs, all those numbers are meaningless.
Thanks! Well documented video! Do you know why when I ping both my ESP32 and Pi Pico w they reply at over 200 ping?
Have you ever made a project with raspberry pico, stepper motor, and a4988 driver sir? If you have, I’ll be greatfull to watch it 😊🙏🏻 thank you, GOD Bless you and all of your family 🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻
Is anyone going to talk about the flawless Photoshopped "Pi Cow" at 0:21?
@MaxPlaysVideogames
Жыл бұрын
Finished the video, apparently he didn't do it .
Hi I am very novice at this sort of thing, I do not know how you made the GUI for clicking the LED on & off, nor the GUI with the slider for changing the servo position Thank you Kelly
Hi do you have a video on how to decode and us an rf remote with arduino. Thanks
how about you try the waveshare 5g hat.
A little disappointing that they are not enabling the Bluetooth when it is already on the chip. Still, an interesting board none the less. Maybe it was easier to get certification with the bluetooth disabled.... It would be nice if they could move to WiFi 5 on some of these boards. More for power svings than speed, but I guess there is a cost to look at too.
Bill, informative as always
Again a fabulous tutorial. Thanx. My router needs the mac adress from the picoW. Is there a way to find out this adress? SOLVED!
@desmond-hawkins
Жыл бұрын
If you run MicroPython on your Pico W, you can try this: import ubinascii import network wlan_sta = network.WLAN(network.STA_IF) wlan_sta.active(True) wlan_mac = wlan_sta.config('mac') print(ubinascii.hexlify(wlan_mac).decode()) It will give you something like "30aea47aa724", you can just add the colons every 2 hex letters if needed, changing it to "30:ae:a4:7a:a7:24".
@fritss7129
Жыл бұрын
@@desmond-hawkins Thanks for your help. My problem is allready solved. Upload the program from Bill and remember from the serial monitor the local IP address. Open on the windows machine, command prompt as administrator. Ping the local IP address. To check remove the PicoW and ping again the local IP. Now you get a error. Connect the PicoW again ping the local IP again to check if the connection is OK and type arp -a and the mac address apears. Sorry for my bad English, it's not my native
Hi Bill! thank you for your video. I am wondering if it is possible to reverse this communication, which means that when we press a physical button on the pico w, something is triggered in the website
BTW I had "error: tls: bad record MAC" during plugin installation. I just closed the Arduino IDE then reopened it and made BOARD MANAGER -> INSTALL again, after the second attemps it was successful.
Can Arduino will help me for keeping rectifier output records in terms of online or offline means Electric Signals can be stored and display by using Arduino so we can monitor DC current and Voltage.
Thank you, I want to build commercial iot device with pico w. How could I let the none tech users configure pico (ideally via a mobile app) to connect to their own home Wi-Fi hotspot without changing and recompiling the software source codes?
Could it be that Bill has written a Dad joke algorithm?
In terms of content, I am looking for a way to store the access data for the WLAN securely, i.e. not in a separate file as plain text. As the RP2040 does not have a CryptoChip, the integration of an external chip such as the ATECC608A would be a possibility. But to be honest, that's a bit too much for me without help...
Can you make a video on how to use ATtiny
Shame they didn't fit an antenna socket on the board, that would have been good
Can we use arduino librairy into the Pico, ex: timer1, keypad, i2clcd
Could anybody recommend a few good shops in Canada if any to buy generic parts, boards, and such. Hoping to possible find a good all in one shop for less shipping costs. Thanks.
41:00 Looked more like 120 deg rather than 180 deg???? Maybe only 90 deg????
Good work but still have room for improvement as with jQuery the JavaScript could be tidy up much better.
I cant find my com port is there something I Maby missed?
HI~ but how to setup it'self into an AP ?
Where do you find there for this mythical $6?
If the WiFi connection is broken does it reconnect?
how about a motion car alarm using P2P Lora?