-
-
Save markusressel/c8e3d5ff3893935920f3e27e65e7e3bb to your computer and use it in GitHub Desktop.
Moved to https://github.com/markusressel/ESPHome-Analog-Clock |
@rocob @markusressel Small correction: last line should divide bij 24 else the hour-hand moves 10 leds instead of 5 per hour
int hour_inc_min_idx = hour_idx + (int) (((float) time.minute / 24) * (it.size() / 60));
The code line you reference and the text you write don't match up.
The hour_inc_min_idx
is used to advance the "hour indicator" by tiny amounts, even if not a full hour has passed.
Dividing by 24 wouldn't make sense on an analog, 12 hour clock.
Not sure what you want to achieve there.
FYI: Since collaboration, progression and maintenance is really hard in a gist, I will move this to:
https://github.com/markusressel/ESPHome-Analog-Clock
For anyone interested: Please open Issues/PRs over there (when I am done) 🤓
Thx for all the input from you guys, I have reworked, updated and improved the template based on your suggestions (and my own improvements).
Special thx to @rocob @ronytomen
@markusressel No problem! Now remake the clock.. :)
@ronytomen what do you mean by "remake"? Anything specific you would like to see? 😄
So I am tinkering with ESPHome and have neopixels. My issue is that there is no guidance on what to install as far as libraries and where to specifically install them. It seems that the documentation is designed to have me spend days just on that issue. Can you help out, please?
That is the most surprising statement about ESPHome as I found it's one of the best documented projects I've seen. For actually setting up the hardware a more specialized tutorial (e.g. from Adafruit) might be more appropriate but then going to https://esphome.io/ and walking through the "Getting Started" - "using the command line" should get an initial setup running without too much fuzz.
When I search an ESPHome integration and this is the statement:
"It is very similar to the FastLED Light platform. In fact, most addressable lights are supported through both light platforms. The difference is that they use different libraries: while the fastled platform uses the FastLED library, this integration uses the NeoPixelBus library internally."
it does not state that the libraries are already installed. I had to search out numerous sources and finally found a youtube video. This is frustrating because I am trying to figure out how to install a library that is already preinstalled.
In all normal use cases you don't need to install anything when running ESPHome except esphome
itself. Your only input is the yaml
file which declares what you want to use and the ESPHome build process will take care of all the dependencies. Don't try to make things more difficult than they are, my advice would be:
- Really follow the "Getting started" steps on the esphome website (don't invent other steps, really follow what's explained there with the first simple example and get that working)
- Maybe join one of their platforms if you still have questions, this here is not a general esphome support page
In all normal use cases you don't need to install anything when running ESPHome except
esphome
itself. Your only input is theyaml
file which declares what you want to use and the ESPHome build process will take care of all the dependencies. Don't try to make things more difficult than they are, my advice would be:
- Really follow the "Getting started" steps on the esphome website (don't invent other steps, really follow what's explained there with the first simple example and get that working)
- Maybe join one of their platforms if you still have questions, this here is not a general esphome support page
Nothing in the "Getting Started" section that states if the neopixel libraries come pre-installed. That is what I was asking about since this topic was about creating a clock using neopixels and esphome.
When compiling this example, I get al lot of warnings of ESPColor being deprecated, like:
warning: 'using ESPColor = struct esphome::Color' is deprecated: esphome::light::ESPColor is deprecated, use esphome::Color instead.
Have no idea how to edit the code to repair this. Anyone any clue how to do this? Appreciated!