Google Chat: zj734465502@gmail.com
+86-0755-88291180
sales01@spotpear.com
dragon_manager@163.com
services01@spotpear.com
manager01@spotpear.com
WhatsApp:13246739196
The XIAO RA4M1 integrates Renesas' RA4M1 chip (32-bit ARM® Cortex®-M4 MCU, up to 48 MHz) into the classic XIAO form factor. The board offers 256KB Flash, 32KB SRAM, 8KB EEPROM, USB 2.0 connector, reset and start buttons, 3 LEDs, 14-bit A/D converter, 12-bit D/A converter, and CAN BUS interface. With onboard charging circuitry and low-power modes (down to 45μA), it's ideal for battery-powered applications. It shares the same 32-bit R7FA4M1AB3CFM microcontroller as the Arduino Uno R4 and is natively compatible with the Arduino IDE and a wide range of XIAO accessories, making it the perfect starting point for electronics projects.
You will need the following:
The recommended programming tool for XIAO RA4M1 is Arduino IDE, so as part of software preparation, you need to complete the installation of Arduino.
Navigate to File > Preferences and fill in the following in Additional Boards Manager URLs URL:https://files.seeedstudio.com/arduino/package_renesas_1.2.0_index.json
Navigate to Tools > Board > Board Manager... , enter the keyword RA4M1 in the search box, select the latest version of Seeed Renesas Board, and install it.
On the Arduino IDE, search for xiao in the development board on the left, select XIAO_RA4M1, and then select the port directly.
Sometimes, using the wrong program can cause XIAO to lose ports or not function properly. Common problems include:
When encountering the above two situations, you can try to put XIAO into BootLoader mode, which can solve most of the problems of device recognition failure and upload failure. The specific method is:
When the program runs abnormally, you can press the Reset key once when powering on to let XIAO re-execute the uploaded program; you can also enter the BootLoader mode by holding down the BOOT key when powering on and pressing the Reset key again.
By now, I believe you have a good understanding of the functions and hardware of XIAO RA4M1. Next, let's take the simplest Blink program as an example to perform the first flashing for your XIAO RA4M1!
Once the program is uploaded successfully, you will see the following output message and you can observe that the orange LED on the right side of XIAO RA4M1 is blinking.
Congratulations, you have learned how to write and upload programs for XIAO RA4M1!
Note that the LED will only turn off if the user LED pin on the XIAO RA4M1 is set high, and the LED will only turn on if the pin is set low.
The XIAO RA4M1 comes with a built-in RGB LED that you can control, below is an example of how to smoothly change the LED color between red, green and blue.
Navigate to Sketch > Include Libraries > Manage Libraries... and search for Adafruit_NeoPixel to install the latest version.
#include <Adafruit_NeoPixel.h>
#define LED_PIN RGB_BUILTIN // Define the pin for the built-in RGB LED
#define NUM_PIXELS 1 // Number of WS2812 LEDs
Adafruit_NeoPixel pixels(NUM_PIXELS, LED_PIN, NEO_GRB + NEO_KHZ800);
void setup() {
pinMode(PIN_RGB_EN, OUTPUT); // Set up the power pin
digitalWrite(PIN_RGB_EN, HIGH); //Turn on power to the LED
pixels.begin(); // Initialize the NeoPixel library
}
void loop() {
// Transition from Red to Green
for (int i = 0; i <= 255; i++) {
pixels.setPixelColor(0, pixels.Color(255 - i, i, 0)); // Red decreases, Green increases
pixels.show();
delay(10); // Adjust delay for smoothness
}
// Transition from Green to Blue
for (int i = 0; i <= 255; i++) {
pixels.setPixelColor(0, pixels.Color(0, 255 - i, i)); // Green decreases, Blue increases
pixels.show();
delay(10); // Adjust delay for smoothness
}
// Transition from Blue to Red
for (int i = 0; i <= 255; i++) {
pixels.setPixelColor(0, pixels.Color(i, 0, 255 - i)); // Blue decreases, Red increases
pixels.show();
delay(10); // Adjust delay for smoothness
}
}
Problem 1: Welding引脚
Due to the small size of XIAO RA4M1, please be careful when soldering the pin header. Do not stick different pins together, and do not stick the solder to the shielding cover or other components. Otherwise, it may cause XIAO to short-circuit or malfunction. The consequences caused by this shall be borne by the user.
Monday-Friday (9:30-6:30) Saturday (9:30-5:30)
Email: services01@spotpear.com