Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: ESP32-C3 to the supported boards. #466

Merged
merged 2 commits into from
Oct 19, 2024
Merged

Conversation

nikolai2111
Copy link
Contributor

Hello,

Today I tried to use another ESP32 board, because as I read the ESP32-C3 is the cheaper replacement for the ESP8266 when this has reached its EOL in 2029. It worked surprisingly well. I had to modify the following parts:

  • Add: the esp32c3dev environment.
  • Mod: the NeoPixel method which gets used for the LEDs, because as far as I have seen in the code this is a universal method it could also work with the ESP8266, but this has to be confirmed.
  • Add: a simple and easy definition of the LEDGPIO for convenience, to change the pins for the different ESPs. I also suggest that this gets done in a more universal way in the Wortuhr.cpp for all the periphery. I don't like the magic values in the code for the GPIOs.

I have tested the code with an ESP32 DevKit v1 (ESP32 Wroom 32) and an official ESP32-C3-DevKitC-02. It worked without problems.

@dbambus
Copy link
Collaborator

dbambus commented Oct 19, 2024

Hello @nikolai2111,

Thanks for the input :-) Can you help me out with the ESP32 boards, can you think of which ports, apart from A0, make the most sense to hard code for a schematic for ESP32 and ESP32C3.

Cheers
David

@dbambus dbambus merged commit 063cf74 into ESPWortuhr:main Oct 19, 2024
2 checks passed
@nikolai2111
Copy link
Contributor Author

No problem, I have to thank you!

As I already mentioned it I would like to have something like this for "all" the boards / configuration.

// Somewhere in the Wortuhr.cpp
#if defined(ESP32)
#include "esp32_periphery.h"
#elif defined(ESP32C3)
#include "esp32c3_periphery.h"
...
// Header File esp32_periphery.h 
#define LEDGPIO 27
#define ANALOGGPIO A0
...

My ideal idea would be a repository for a complete clock. The clock would basically be made up of layers, e.g. back plate, PCB, separator plate and front plate, whereby the front plate is basically the only one that is customised. The rest is standard, the PCB also has various equipment variants, e.g. with and without RTC / light sensor etc. The front panels then vary in language and also in materials such as metal, plastic, glass and so on.
I can also see offering such a kit for sale.
Therefore, it would certainly be an advantage if only such boards / configurations had to be loaded, or if the build flags already selected the rich switches when compiling.

For the pins of the ESP32-C3 I'm not sure, because I'm developing the schematics right now, but I would NOT choose the GPIO2, GPIO8, and GPIO9, because they have some special / critical meaning to the boot process or something else. For the analog pin I would choose GPIO3 (ADC1_CH3), because it's the only one with other things on it?

You will hear from me when I have done my first draft of the schematics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants