Open amin-is opened 1 year ago
You should have purchased pirated hardware, but I can provide you with technical support.
W2812 Micropython CODE: from machine import Pin from neopixel import NeoPixel
pin = Pin(48, Pin.OUT) np = NeoPixel(pin, 1) np[0] = (10,0,0) #R B G max 255 255 255 np.write() r, g, b = np[0]
At 2023-07-05 01:15:10, "Amin" @.***> wrote:
Can you give an example code for this board RGB LED blinking OR NeoPixel example code
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Can you give me arduino c language example. I have purchase a board when backside printed was only Board model, version and your web address and no any others information like this board. May be this board is copy..
@amin-is Hey guy,I have the same problem but I have fixed it,your board may be a knockoff,please see #1 , and this is my program to blink RGB using arduino。
#include <Arduino.h>
#include <FastLED.h>
#define LED_PIN 48
#define LED_NUMS 1
CRGB leds[LED_NUMS];
void setup() {
Serial.begin(115200);
FastLED.addLeds<NEOPIXEL, LED_PIN>(leds, LED_NUMS);
}
void loop() {
leds[0] = CRGB(255, 0, 0);
FastLED.show();
Serial.print("RED \n");
delay(1000);
leds[0] = CRGB(0, 255, 0);
FastLED.show();
Serial.print("Green \n");
delay(1000);
leds[0] = CRGB(0, 0, 255);
FastLED.show();
Serial.print("Blue \n");
delay(1000);
}
of course it work correctly!
你购买的板子可能为山寨板子,注意通信线路是否连接
At 2023-07-24 15:45:36, "buxiua" @.***> wrote:
@amin-is Hey guy,I have the same problem but I have fixed it,your board may be a knockoff,please see #1 , and this is my program to blink RGB using arduino。
CRGBleds[LED_NUMS];
voidsetup() { Serial.begin(115200); FastLED.addLeds<NEOPIXEL, LED_PIN>(leds, LED_NUMS); }
voidloop() { leds[0] =CRGB(255, 0, 0); FastLED.show(); Serial.print("RED \n"); delay(1000); leds[0] =CRGB(0, 255, 0); FastLED.show(); Serial.print("Green \n"); delay(1000); leds[0] =CRGB(0, 0, 255); FastLED.show(); Serial.print("Blue \n"); delay(1000); }
of course it work correctly!
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
F.Y.I. This board has a solder jumper marked RGB right next to the RBG LED which you have to short with a blob of solder and then the standard RGB Arduino sample code will work. The RGB led is connected to GPIO pin 38 and I guess the jumper is there in case you want to use this pin for a different purpose.
Can you give an example code for this board RGB LED blinking OR NeoPixel example code