Quick Start
Welcome to the SparkFun IoT RedBoard - RP2350 Quick Start Guide showing how to set up and use the RM2 wireless chip to connect to a WiFi network, request and download data on the number and names of astronauts currently on the International Space Station.
If you're not familiar with using development boards or the development environments covered in this guide, refer to the Hardware & Software sections for a detailed overview of the board along with instructions on setting up and programming the IoT RedBoard - RP2350.
Basic Assembly
Start by plugging the IoT RedBoard - RP2350 into your computer using a USB-C connector.
Code Examples
The following examples for both MicroPython and Arduino can be found in the Examples folder here in the GitHub repository. They demonstrate how to connect the IoT RedBoard - RP2350 to a WiFi network and then request and download data on the number of astronauts currently in space. They also include a visual indicator of the connection status using the RGB LED on the board like the photos below show:
MicroPython
The IoT RedBoard - RP2350 ships with MicroPython firmware pre-loaded on the board. If needed, you can find the latest release of the firmware here. Open and run the Astronaut Network Demo in MicroPython by following these steps:
- Ensure you have a Python IDE like Thonny installed or use a Command Line Interface (CLI) if you prefer.
- Download and open the Astronaut Network Demo in your preferred Python IDE (or CLI).
- Adjust values for
WIFI_NETWORK
andWIFI_PASSWORD
to your network's credentials. - Run the example.
- Watch the serial print out for status updates along with the RGB cycling from red to blue and then green.
Code to Note:
-
Required modules for the example:
-
LED control. Values are (R,G,B) 0-255. This sets the LED to full Red:
-
WiFi network connection. Enter values for network ID and password:
Serial print and download request for the list of astronauts currently in space: -
Serial print of the number of and names of astronauts:
Arduino IDE
Run the Astronaut Network Demo using the Arduino IDE by following these steps:
- Download and open the Astronaut Network Demo sketch in Arduino.
- Open the Board Manager and search for "Arduino Pico" to install the Arduino-Pico package.
- Open the Library Manager and search for "FastLED" to install the FastLED Arduino Library
- Adjust the WiFi variables ("SSID" and "PASSWORD") to your network's credentials.
- Select the board (SparkFun IoT RedBoard - RP2350) and Port and click the "Upload" button.
- On upload completion, open the Serial Monitor with the baud set to 115200 and watch the serial printout along with the RGB LED cycling from red to blue and then green.
The example includes several serial prints to indicate success or failure. If the code fails at any point, refer to the associated serial print to help identify where it failed and why.
Code to Note:
-
WiFi network variables. Adjust "SSID" and "PASSWORD" to your WiFi network's ID and password:
-
WS2812 LED pin definition and settings:
-
Attempt to connect to WiFi network:
-
Send HTTP get request:
-
Parse JSON request:
-
Print number & names of astronauts in space:
int numberOfPeople = doc[F("number")]; Serial.print(F("There are ")); Serial.print(numberOfPeople); Serial.println(F(" astronauts in space.")); for(JsonObject people_item : doc[F("people")].as<JsonArray>()) { int people_item_id = people_item[F("id")]; const char* people_item_name = people_item[F("name")]; Serial.print(people_item_id); Serial.print(F(": ")); Serial.println(people_item_name); }
Going Further
If you're looking for more detailed information on the design and components on this IoT Redboard, read on to the Hardware section below. Similarly, the Software tab includes detailed instructions on installing and using all supported development environments along with a few more examples for each IDE. Finally, the Resources section includes the board design files and datasheets for major components on the board.