Stamp C nonblocking led script?
-
Hello together,
using my Stamp C but cannot get the button led running without blocking.
anybody can point me to a sample for this?
would be great !Thx & cheers, K.
-
-
Hello @Knobsi
The RGB LED can use the neopixel Write instruction with Arduino ESP32 Version 2.0.4.
Arduino IDE Boards Manager
Arduino ESP32 Version 2.0.4
https://github.com/espressif/arduino-esp32/releases?fbclid=IwAR19R5_0Y1bW5DiYk4PBp7RAeFKjNrSo9YJZuHXmwNKY-dT7z_fYDKHzSoI
Improvements- Implemented a simple RGB driver via digitalWrite
- Implement simple RGB driver via digitalWrite; solving #6783 by @PilnyTomas in #6808
:
https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-rgb-led.h
void neopixelWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val);
:#define LED_PIN 2
void setup() {
neopixelWrite(LED_PIN,10,100,200); // GPIO,R,G,B
}void loop() {
} -
You can make a new class , create a task to control blink or not, and color, with only one function call in you main code . I have done it, but is on vacation now, so cant share it.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better đ
Register Login