FastLED seems broken for ESP32C3 boards

@argafal: I had some time today. You find the result at GitHub. Please check the changes to your lolin_c3_mini_with_serial build environment. I had some difficulties applying the first of your patches from above. The gnu patch utility may have been overly picky.
In main/User_config.h you find a possible solution to accommodate both your green and my blue based color preferences. Your colors are default. To get the gold on blue choice specify -DANEOPIX_COLOR_SCHEME=1 for the build.
I think color during boot time should be well visible but not the same as for error. What do you think about hot pink? At least it sounds terrible enough for signaling reboots.
Please test my changes and suggest improvements. See you.

I love the aqua for booting. Nice pick, I want it too.

I also realized that the golden flash works well with either the blue or the green dim base colour.

That made me end up with the following diff. Only the base colour is different now. I added the option to the lolin_c3_mini environment, with a comment.

$ git diff
diff --git a/environments.ini b/environments.ini
index 7faf6c6..5a85c77 100644
--- a/environments.ini
+++ b/environments.ini
@@ -1593,6 +1593,7 @@ build_flags =
  ; '-DANEOPIX_BRIGHTNESS=10'  ; 0 - 255, default 20
+ ; -DANEOPIX_COLOR_SCHEME=1   ; Alternative LED colour scheme: 1 = blue/gold. 0 = green/gold
   '-DRGB_INDICATORS=2'        ; 2 = use Adafruit NeoPixel library
 ; The momentary switch on the board is connected to GPIO9
diff --git a/main/User_config.h b/main/User_config.h
index 7461510..5738142 100644
--- a/main/User_config.h
+++ b/main/User_config.h
@@ -512,10 +512,10 @@ Adafruit_NeoPixel leds(ANEOPIX_IND_NUM_LEDS, ANEOPIX_IND_DATA_GPIO, ANEOPIX_LED_
 // signalling color combinations tested for good visibility
-#    define ANEOPIX_SENDRECEIVE ANEOPIX_GREEN   // bright green = sending
+#    define ANEOPIX_SENDRECEIVE ANEOPIX_GOLD    // bright gold  = sending
 #    define ANEOPIX_INFO ANEOPIX_GREEN_DIM      // dimmed green = info
 #  else
 #    define ANEOPIX_SENDRECEIVE ANEOPIX_GOLD    // bright gold = sending

My 2 cents: it is not worth maintaining two different colour schemes and an option for it. I am happy if blue/gold becomes the new default and the other option gets removed entirely. :slight_smile:

@argafal I have applied your diffs and cleaned up afterwards. You find the code at the usual place. Please check. In my main/User_config.h there are 73 lines of code for Adafruit_NeoPixel and 74 lines for FastLED. I think that is tolerable and would vote for keeping the versatility of color schemes. At least we spent quite some time staring at our RGB LEDs wondering what OMG was doing.
How is your “Lolin C3 mini v2.1.0” doing in terms of errors and reboots? My “ESP32-C3-DevKitC-02” still runs very well with the adafruit/Adafruit NeoPixel library. So I would regard the problem solved.
If you agree I will open a new thread to ask 1technophile to review and integrate our stuff into OpenMQTTGateway code.

1 Like

The Lolin C3 mini works nicely. I have not encountered any problems so far. I agree that it would be nice to integrate your NeoPixel changes. Full support for a pull request. :slight_smile:
Good job, @mrickma!