Difference between revisions of "XIAO-RA4M1"
(→Hello Word [Code]) |
(→Blink [Code]) |
||
| Line 30: | Line 30: | ||
[[File:Grove Base for XIAO 1.PNG|200px]] | [[File:Grove Base for XIAO 1.PNG|200px]] | ||
[[File:XIAO RA4M1 4.PNG|125px]] | [[File:XIAO RA4M1 4.PNG|125px]] | ||
| + | |||
| + | —— | ||
=== Play with RGB LEDs [Code] === | === Play with RGB LEDs [Code] === | ||
Revision as of 14:22, 21 August 2025
Contents
Support
XIAO-RA4M1
Renesas RA4M1
build-in RGB LED
Navigate to File > Preferences, and fill "Additional Boards Manager URLs" with the url below: https://files.seeedstudio.com/arduino/package_renesas_1.2.0_index.json
type the keyword RA4M1
Liens externes
https://www.seeedstudio.com/Seeed-XIAO-RA4M1-p-5943.html
https://wiki.seeedstudio.com/getting_started_xiao_ra4m1/
Blink [Code]
Navigate to File > Examples > 01.Basics > Blink, open the program.
https://wiki.myows.top/index.php?title=Blink_Examples_01-Basics
——
Play with RGB LEDs [Code]
Changer la couleur de la LED entre le rouge, le vert et le bleu
LED user allumé
LED RGB change de couleur, mais lumiere très forte
Bibliothèque : https://github.com/adafruit/Adafruit_NeoPixel
#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
}
}
Adjust delay for smoothness : Ajustez le délai pour plus de fluidité
Hello Word [Code] & OLED Display 1.12
https://wiki.myows.top/index.php?title=OLED_Display_1.12#Code_Hello_World.21_.28u8g2.29