Ok, i was stupid to install a new board to test.. (Xiao ESP32C3)..I did skip all updates the last year so i could compile all my sketches..
Installing the newest ESP-boards (including this Xiao ESP32C3) also installed IDF v5.1 and there the trouble started.. FastLED generates about 90% of all errors (most of them deprecated) Also things about rmt.h, i have to use rmt_tx.h or rmt_rx.h instead.. I scanned the internet all day but can't find any of these to install, nor does any newer version of FastLED solve this...
my Watchdog (esp_task_wdt.h) even aborts compiling, so i left it out temporarily..
Is there a good alternative for FastLED that works with this new IDF?
I thought my former IDF was version 4.4(?) how can i revert to this version to see if i can compile without warnings/errors like before?
I moved your topic to a more appropriate forum category @TechGraphix.
The Nano ESP32 category you chose is only used for discussions directly related to the Arduino Nano ESP32 board.
In the future, please take the time to pick the forum category that best suits the subject of your question. There is an "About the _____ category" topic at the top of each category that explains its purpose.
Thanks in advance for your cooperation.
Hi @TechGraphix. I see there is a comment about the subject from one of the maintainers of the FastLED library here:
https://github.com/FastLED/FastLED/pull/1619#issuecomment-2133798049
getting things working with the esp 3.0 core is something we're trying to get to as quickly as we can
I'll provide instructions you can follow to do that:
- Select Tools > Board > Boards Manager... from the Arduino IDE menus to open the "Boards Manager" view in the left side panel.
- Scroll down through the list of boards platforms until you see the "esp32" entry.
- Select "2.0.17" from the drop-down menu in the "esp32" entry.
- Click the "INSTALL" button at the bottom of the entry.
- Wait for the installation process to finish, as indicated by a notification at the bottom right corner of the Arduino IDE window:
Successfully installed platform ...
Arduino IDE will occasionally notify you that a new version of the "esp32" boards platform is available, you'll need to refrain from accepting the offer that will cause an update back to the problematic version of the platform. If you find these notifications annoying, you can disable them via the advanced settings.
I'll provide instructions you can follow to do that:
- Press the Ctrl+Shift+P keyboard shortcut (Command+Shift+P for macOS users) to open the "Command Palette".
A menu will appear on the editor toolbar:
- Select the "Preferences: Open Settings (UI)" command from the menu.
ⓘ You can scroll down through the list of commands to find it or type the name in the field.
A "Preferences" tab will open in the Arduino IDE main panel. - Type
arduino.checkForUpdates
in the "Search Settings" field of the "Preferences" tab. - Uncheck the box under the "Arduino: Check For Updates" setting.
- Close the Preferences tab by clicking its X icon.
If you disable the automatic update check, make sure to periodically do a manual check for newer versions of Arduino IDE and your installed boards platforms and libraries. You can check for new versions of Arduino IDE by selecting Help > Check for Arduino IDE Updates from the Arduino IDE menus. You can check for new versions of boards platforms and libraries by selecting "Updatable" from the "Type" menu in the Boards Manager and Library Manager views.
Thanks a lot.
It still generates warnings but only a few..
Bounce != Bounce;
seems legit to me for inverting the state of Bounce (it alway worked that way), so i ignore this message.
I think i can go on with this.
How is Bounce declared ?
initialy as false (bool Bounce = false;)
I have version 3.0.1 of the Espressif board files installed and all warnings enabled
bool Bounce = false;
Bounce = !Bounce;
does not produce any warnings for me
IDE 2.3.2
Windows 10
Did not for me either,..... untill i installed a newer version of ESP32-board to get the Xiao ESP32C3 (which is reverted to 2.0.17 now, which eliminated the FastLED errors)
That's it: appearently Bounce != Bounce; is not the same as Bounce = !Bounce; .....
I'm skeptical. The idea behind compound assignment is to avoid naming the assignee twice, when using a binary operator
x += 2;
x = x + 2;
something_much.longer.than->that += 2;
something_much.longer.than->that = something_much.longer.than->that + 2;
!
is not a binary operator. It is one of the few unary ones. (-
is both binary and unary)
Furthermore, !=
has a much more common meaning: not-equal
if (x != 3) Serial.println("not three");
C is a simple language: any expression can be a statement by itself just by adding a semicolon at the end
x != x;
x == x;
x == 3;
x;
3;
isItThree(x);
Only the last one definitely "does something". The compiler is free to discard the others if they have no effect. Maybe you will get a warning, depending on various flags. With operator overloading in C++, maybe the !=
and ==
expressions in fact do something for a particular type of x
.
You can flip a bool with a compound operator and avoid naming the variable twice
Bounce ^= true;
^
is the seldom-used but should-not-be-that-obscure binary XOR operator. After all, embedded programming is more likely to include bit setting, clearing, and flipping.
I like that one!! I think i have to use XOR more for this toggles.
It makes sense now that != is used in equations and yyy = !xxx assigns the inverted value from xxx to yyy. But XOR(1) is more elegant (although a bit obfuscated )