Google Chat: zj734465502@gmail.com
+86-0755-88291180
sales@spotpear.com
dragon_manager@163.com
tech-support@spotpear.com
zhoujie@spotpear.com
WhatsApp:13246739196
The RP2350-Matrix is a low-cost, high-performance microcontroller development board designed by Waveshare. In a smaller board size, it uses RP2350 as the main controller, incorporating a 6-axis IMU (three-axis accelerometer and three-axis gyroscope) and an 8×8 RGB LED matrix. It integrates 16MB of on-chip Flash for easy development and integration into products.
To facilitate the development of Pico/Pico2 boards with MicroPython on a computer, it is recommended to download the Thonny IDE
【MicroPython】 machine.Pin class function details
【MicroPython】machine.PWM class function details
【MicroPython】machine.ADC class function details
【MicroPython】machine.UART class function details
【MicroPython】machine.I2C class function details
【MicroPython】machine.SPI class function details
【MicroPython】rp2.StateMachine class function details
For C/C++, it is recommended to use Pico VSCode for development. This is a Microsoft Visual Studio Code extension designed to make it easier for you to create, develop, and debug projects for the Raspberry Pi Pico series development boards. No matter if you are a beginner or an experienced professional, this tool can assist you in developing Pico with confidence and ease. Here's how to install and use the extension.
Cmake Path: ${HOME}/.pico-sdk/cmake/v3.28.6/bin/cmake.exe Git Path: ${HOME}/.pico-sdk/git/cmd/git.exe Ninja Path: ${HOME}/.pico-sdk/ninja/v1.12.1/ninja.exe Python3 Path: ${HOME}/.pico-sdk/python/3.12.1/python.exe
Here are two methods for flashing firmware
1. Press and hold the Boot button 2. Connect the development board to the computer 3. Then the computer will recognize the development board as a USB device. 4. Copy the .uf2 file to the USB drive, and the device will automatically restart, indicating successful program flashing.
set(PICO_BOARD pico CACHE STRING "Board type")
https://github.com/earlephilhower/arduino-pico/releases/download/4.5.2/package_rp2040_index.json
Note: If you already have an ESP32 board URL, you can use a comma to separate the URLs as follows:
https://dl.espressif.com/dl/package_esp32_index.json,https://github.com/earlephilhower/arduino-pico/releases/download/4.5.2/package_rp2040_index.json
MircoPython video demo (github)
MicroPython firmware/Blink demos (C)
Raspberry Pi official C/C++ demo (github)
Raspberry Pi official MicroPython demo (github)
Arduino official C/C++ demo (github)
Demo description
Code description
WS2812_init()
: Initialize the RGB LED control pins and configure the relevant parametersWS2812_show2(uint8_t r, uint8_t g, uint8_t b)
: Refresh all RGB LEDs based on the input colorWS2812.h
file, there are four parameters that can be configured:NUM_LEDS
: Number of RGB LEDsLED_BRIGHTNESS
: Maximum Brightness of RGB LEDWIDTH
: RGB LED matrix widthHEIGHT
: RGB LED matrix heightr
to its maximum value, and set the blue and green components g, b
to zero. In the loop, decrease the red component and increase the green component to achieve a red to green gradientg
to its maximum value, and set the red and blue components r, b
to zero. In the loop, decrease the green component and increase the blue component to achieve a green to blue gradientb
to its maximum value, and set the green and red components g, r
to zero. In the loop, decrease the blue component and increase the red component to achieve a blue to red gradientDemo description
Coordinate description
Code description
WS2812_init()
: Initialize the RGB LED control pins and configure the relevant parametersQMI8658_init()
: Initialize the 6-axis IMUQMI8658_read_xyz()
: Read 6-axis IMU dataWS2812_clear()
: Zero out the RGB LED array leds
WS2812_set_pixel(uint8_t x, uint8_t y, uint8_t r, uint8_t g, uint8_t b)
: Set LED color at (x,y)WS2812_show()
: Refresh the RGB LED matrix according to leds
arrayQMI8658_read_xyz
and control RGB LED movement based on the acquired X and Y axis acceleration data.acc[0]
. When acc[0]
is greater than the movement threshold threshold
, the x-coordinate decreases, and the RGB LED moves up. When acc[0]
is less than the movement threshold -threshold
, the x-coordinate increases, and the RGB LED moves downwardacc[1]
. When acc[1]
is greater than the movement threshold threshold
, the y-coordinate increases, and the RGB LED moves to the right. When acc[1]
is less than the movement threshold -threshold
, the y-coordinate decreases, and the RGB LED moves to the leftDemo description
Safety tips
Code description
WS2812_init()
: Initialize the RGB LED control pins and configure the relevant parametersWS2812_show2(uint8_t r, uint8_t g, uint8_t b)
: Refresh all RGB LEDs based on the input colorread_onboard_temperature()
: Get the core temperatureread_onboard_temperature()
and control the brightness change according to the set temperature and brightness array BRIGHTNESS_LEVELS
temp
is greater than the next level temperature, the level increases and the brightness decreases.temp
will slowly decrease. When the core temperature temp
drops to the previous temperature level +1°C, the level decreases and the brightness increases.Demo description
Code description
LEDController()
: Initialize the RGB LED control pins and configure the relevant parametersled_ctrl.show2()
: Refresh all RGB LEDs based on the input colorWS2812.py
file, there are four parameters that can be configured:NUM_LEDS
: Number of RGB LEDsLED_BRIGHTNESS
: Maximum Brightness of RGB LEDWIDTH
: RGB LED matrix widthHEIGHT
: RGB LED matrix heightr
to its maximum value, and set the blue and green components g, b
to zero. In the loop, decrease the red component and increase the green component to achieve a red to green gradientg
to its maximum value, and set the red and blue components r, b
to zero. In the loop, decrease the green component and increase the blue component to achieve a green to blue gradientb
to its maximum value, and set the green and red components g, r
to zero. In the loop, decrease the blue component and increase the red component to achieve a blue to red gradientDemo description
Coordinate description
Code description
LEDController()
: Initialize the RGB LED control pins and configure the relevant parametersQMI8658_init()
: Initialize the 6-axis IMUimu.Read_XYZ()
: Read 6-axis IMU dataled_ctrl.clear()
: Zero out the RGB LED array leds
led_ctrl.set_pixel()
: Set LED color at (x,y)led_ctrl.show()
: Refresh the RGB LED matrix according to leds
arrayimu.Read_XYZ()
and control RGB LED movement based on the acquired X and Y axis acceleration data.xyz[0]
. When xyz[0]
is greater than the movement threshold threshold
, the x-coordinate decreases, and the RGB LED moves up. When xyz[0]
is less than the movement threshold -threshold
, the x-coordinate increases, and the RGB LED moves downwardxyz[1]
. When xyz[1]
is greater than the movement threshold threshold
, the y-coordinate increases, and the RGB LED moves to the right. When xyz[1]
is less than the movement threshold -threshold
, the y-coordinate decreases, and the RGB LED moves to the leftDemo description
Safety tips
Code description
LEDController()
: Initialize the RGB LED control pins and configure the relevant parametersled_ctrl.show2()
: Refresh all RGB LEDs based on the input colorread_onboard_temperature()
: Get the core temperatureread_onboard_temperature()
and control the brightness change according to the set temperature and brightness array BRIGHTNESS_LEVELS
temp
is greater than the next level temperature, the level increases and the brightness decreases.temp
will slowly decrease. When the core temperature temp
drops to the previous temperature level +1°C, the level decreases and the brightness increases.You can refer to the RP2350-E9 section in the RP2350 Datasheet
Monday-Friday (9:30-6:30) Saturday (9:30-5:30)
Email: services01@spotpear.com