Raspberry Pi Pico

Raspberry Pi Pico W and Adafruit IO with Arduino IDE

Raspberry Pi Pico W:

 

Raspberry Pi Pico W and Adafruit IO with Arduino IDE– Recently, I got Raspberry Pi Pico W from SunFounder at quite a reasonable price with free shipping. You can also try their Ultimate starter kit based on Raspberry Pi Pico W. Anyway, there are lots of things I am going to cover in this article. I will be comparing Raspberry pi Pico with Raspberry Pi Pico Wireless, I will also explain how to program Raspberry Pi Pico W using Arduino IDE, And I will also explain how to use Raspberry Pi Pico W with Adafruit IoT platform for sensor monitoring.

I have already written several articles on Raspberry pi Pico and in all those articles I have used MicroPython. So, if you want to learn how to program Raspberry pi Pico using MircroPython then I highly recommend; read my previous articles. Because in today’s article, I will be only using Arduino IDE.

allpcb circuit




Raspberry Pi Pico W:

Raspberry Pi Pico W is Raspberry Pi’s first wireless microcontroller board, designed especially for physical computing. Microcontrollers are a different type of device than Single Board Computers (like the Raspberry Pi 4 and previous generations of Pi), they don’t run an operating system and they are typically programmed to do just one task – though that task can be pretty intricate and exciting! They’re perfect for experimenting with hardware and using as the brains of custom devices, machines and inventions. With the onboard 2.4GHz wireless capabilities of the Pico W, it’s now possible for your creations to talk to each other, and to the internet! Apart from the addition of wireless networking, Raspberry Pi Pico W is very similar to Raspberry Pi Pico and, like all RP2040-based boards, can be easily reprogrammed over USB from a Raspberry Pi or other computer using the C/C++ SDK or the official MicroPython port.

Raspberry Pi Pico W comes without header pins so you’ll need to pick some up separately if you’re planning on plugging your Pico into a breadboard or one of our Pico add-ons. A Pico WH (with pre-soldered headers) is in the works but won’t be available at launch.

Pico W Specifications

Raspberry Pi Pico W has been designed to be a low cost yet flexible development platform for RP2040, with a 2.4GHz wireless interface and the following key features:

  • RP2040 microcontroller chip designed by Raspberry Pi in the United Kingdom
  • Dual-core ARM Cortex M0+ processor, flexible clock running up to 133 MHz
  • 264kB of SRAM, and 2MB of on-board Flash memory
  • On-board single-band 2.4GHz wireless interfaces (802.11n)
  • Castellated module allows soldering direct to carrier boards
  • USB 1.1 Host and Device support
  • Low-power sleep and dormant modes
  • Drag & drop programming using mass storage over USB
  • 26 multi-function GPIO pins
  • 2×SPI, 2×I2C, 2×UART, 3×12-bit ADC, 16×controllable PWM channels
  • Accurate clock and timer on-chip
  • Temperature sensor
  • Accelerated floating point libraries on-chip
  • 8×Programmable IO (PIO) state machines for custom peripheral support

Raspberry Pi Pico W and Pico WH incorporate an Infineon CYW43439 wireless chip. CYW43439 supports IEEE 802.11 b/g/n wireless LAN, and Bluetooth 5.2; of these, only wireless LAN is supported at launch



Raspberry Pi Pico W Pinout:

Raspberry Pi Pico W

Raspberry Pi Pico W Vs Raspberry Pi Pico:

Raspberry Pi Pico W

The main difference between the Raspberry Pi Pico and Raspberry Pi Pico W is that the Raspberry Pi Pico W has Wi-Fi connectivity while the Raspberry Pi Pico does not have any WiFi connectivity. The remaining specifications for both the Raspberry Pi Pico and Raspberry Pi Pico W are exactly the same.

Raspberry Pi Pico W Raspberry Pi Pico
Microcontroller RP2040 microcontroller chip RP2040 microcontroller chip
RAM 256kB 256kB
Processor Dual-core ARM Cortex M0+ processor Dual-core ARM Cortex M0+ processor
Flash memory 2MB 2MB
GPIO Pins 26 26
ADC 3 CH 12 bit 3 CH 12 bit
I2C 2 2
SPI 2 2
UART 2 2
PWM 16 16

As you can see the layout of the pins is also exactly the same.

Raspberry Pi Pico W

The other difference is that in the Raspberry Pi Pico the onboard led is on the GPIO26 while in the Raspberry Pi Pico W the onboard led is on the GPIO0. The GPIO26 in the Raspberry Pi Pico W is reserved for SPI communication with the wireless module.



Raspberry Pi Pico W with Arduino ide:

In order to use Raspberry Pi Pico W with Arduino IDE, first, you will need to install the Raspberry Pi Pico W board. For this, you will need to copy the following link.

https://github.com/earlephilhower/arduinopico/releases/download/global/package_rp2040_index.json

Next, Open the Arduino IDE. Go to the File Menu and then to Preferences. Paste the link, as you can see I have already pasted the link.

Raspberry Pi Pico W

If you have other boards links then simply put a comma and then paste the link…Finally, click on the Ok button, but as I have already pasted the link so I will click on the cancel button.

Next, go to the Tools Menu then to board, and click on the Boards Manager. Search for the Raspberry Pi Pico.

Raspberry Pi Pico W

As you can see I have already installed the Raspberry Pi Pico. Now, again go to Tools, then Board, and check if you can see Raspberry Pi Pico W.

Raspberry Pi Pico W

If you can see the Raspberry Pi Pico W then congrats you are done with the hard part. Anyway, the Arduino Ide is ready.

For the Demonstration purposes, I am going to use the DHT11 Temperature and Humidity Sensor with the Raspberry Pi Pico W. This is going to be an IoT “Internet of things” based project as I will be using Adafruit Io with Raspberry Pi Pico W for monitoring the Temperature and Humidity values from anywhere in the world. So, first let’s go ahead and take a look at the circuit diagram.



Amazon Links:

Raspberry Pi Pico W

Dht11 Sensor

Raspberry Pi Pico W Ultimate Kit

Other Tools and Components:

Top Arduino Sensors:

Super Starter kit for Beginners

Digital Oscilloscopes

Variable Supply

Digital Multimeter

Soldering iron kits

PCB small portable drill machines

*Please Note: These are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!

DHT11 with Raspberry Pi Pico W:

Raspberry Pi Pico W

The Voltage and GND pins of the DHT11 Temperature and Humidity Sensor are connected with the 3.3V and GND pins of the Raspberry Pi Pico W. While the S pin or Data pin of the DHT11 sensor is connected with the GPIO pin 16. If you are not comfortable with using a breadboard, you can design a custom PCB for your Raspberry Pi Pico W. And you can send your Gerber Files to PCBWay for manufacturing High-quality PCBs. 

Raspberry Pi Pico W



Adafruit IO:

Raspberry Pi Pico W

For the Dashboard designing in Adafruit IO, you will need to read my previous article on the ESP8266, DHT11, and Adafruit IO. As I am going to use the same Dashboard. Anyway, once your dashboard is ready then you can start programming your Raspberry Pi Pico W using Arduino IDE. So, let’s go ahead and take a look at the programming.

Raspberry Pi Pico W Programming:

Just like I am using the Adafruit dashboard from my previous project, likewise I am using the same code which I wrote for the NodeMCU ESP8266 WiFi module. Below is the code that I wrote for Nodemcu ESP8266 WiFi Module. I am going to modify it a little bit.

ESP8266 and Adafruit:

 



Raspberry Pi Pico W and Adafruit Io:

Whereas this is the code that I wrote for the Raspberry Pi Pico W. The code that I wrote for the Raspberry Pi Pico W is the Modified version of my previous code. The only changes I made are, as this time I am not using the Oled display module and the 5V buzzer so I deleted the related libraries and code.



Instead of using the ESP8266WiFi library I am using the WiFi library. If you have been using the ESP8266 board then you should have this WiFi library. Or else you will have to install this; for this you can read my getting started article on the NodeMCU ESP8266 WiFi Module.

Anyway, you can see, I am using the same DHT library and the same Adafruit libraries. Previously, I was using D4 pin on the ESP8266 while this time I am using GPIO Pin 16 on the Raspberry Pi Pico W. The Oled display module code is deleted.

I am using the same WiFi credentials.

The Adafruit IO settings are 100% the same.

Code inside the setup() function is exactly the same.

And the code inside the Loop() is exactly the same.

The reason, I am using the same code which I wrote for the NodeMCU ESP8266 with the Raspberry Pi Pico W is, I wanted to explain that you can convert all your ESP8266 or ESP32 related projects into Raspberry Pi Pico W based projects. I have hundreds of articles on Nodemcu ESP8266 and ESP32, you can select any project, copy code from there and use it with your Raspberry Pi Pico W. So, that’s all about the programming. Now, let’s go ahead and watch the Raspberry Pi Pico W and Adafruit IO based Temperature and Humidity monitoring system in action.

Raspberry Pi Pico W

After applying heat…

Raspberry Pi Pico W

Watch Video Tutorial

Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button