Note:
This page demonstrates basic usage of a single piece of hardware on the Fruit Jam. The device can be picky about the order that things are initialized when using multiple of the peripherals. If you're doing something involving the display, DAC, WiFi, or USB ports we recommend to start from the factory demo Arduino code and remove anything you don't need, rather than starting from these basic individual examples.
Library Install
We're using a variant of the Arduino WiFiNINA library, which is amazing and written by the Arduino team! We made a fork that you can install.
Click here to download the library:
Within the Arduino IDE, select Install library from ZIP...
And select the zip you just downloaded.
First Test
OK now you have it wired and library installed, time to test it out!
Lets start by scanning the local networks. Load up the ScanNetworks example
At the top you'll see an include for pin_config.h, in that file iswhere the GPIO pins are defined.
If you don't see this, you may have the wrong WiFiNINA library installed. Uninstall it and re-install the Adafruit one linked above.
You do not need to change any of these pins - they're pre-defined in the board definition for the Metro M4 WiFi but you still will want to have our version of the library installed because you can switch to the AirLift shield or breakout.
Make sure you select Adafruit Fruit Jam RP2350
Compile and upload to your board.
If you don't even get the MAC address printed out, check your wiring.
If you get the MAC address but cannot scan any networks, check your power supply. You need a solid 3-5VDC into Vin in order for the ESP32 not to brown out.
WiFi Connection Test
Now that you have your wiring checked, time to connect to the Internet!
Open up the WiFiWebClient example
Open up the secondary tab, arduino_secrets.h. This is where you will store private data like the SSID/password to your network.
You must change these string values before updating to your board!
After you've set it correctly, upload and check the serial monitor. You should see the following. If not, go back, check wiring, power and your SSID/password
You must change these string values before updating to your board!
After you've set it correctly, upload and check the serial monitor. You should see the following. If not, go back, check wiring, power and your SSID/password
Secure Connection Example
Many servers today do not allow non-SSL connectivity. Lucky for you the ESP32 has a great TLS/SSL stack so you can have that all taken care of for you. Here's an example of a secure WiFi connection:
Note we use WiFiSSLClient client; instead of WiFiClient client; to require an SSL connection!
Page last edited August 06, 2025
Text editor powered by tinymce.