Code Monkey home page Code Monkey logo

led-clockshelf's Introduction

LED-Pixel-Clock

Animation example

This is the software of a variation of the LED clock from DIY Machines A configuration which works on the original version of the clock is also part of the source code.

I decided to code it completely from scratch at I wanted to use a ESP32 instead of the Arduino nano and RTC that is used in the original project. This enables some cool features like smartphone app control, OTA updates and fetching of the time using the internet.

Additionally this has full support for animations. By default I provide all needed animations for a 12h clock to morph one digit into another soothly. Further animations can be easily added and existing animation can be adjusted to your liking.

The whole codebase is highly modular and configurable and can be tweaked exactly to your preferences.

Detailed documentation is available on read the docs.

If you are interested in my variation of the design which uses a lot of wood instead of the 3D prints and is a bit bigger than the original you can find it on thingiverse here

Development Environment

I am using VScode with PlatformIO. VSCode can be downloaded from here. And PlatformIO is an extension that can easily be installed from inside of VSCode.

Via the PlatformIO home the following libraries have to be installed:

  • "Blynk" by Volodymyr Shymanskyy
  • "FastLED" by Daniel Garcia
  • "LinkedList" by Ivan Seidel

Getting started

A quick list of things that have to be done to get this project up and running:

  1. Make sure you have VS Code and the PlatformIO extension installed
  2. Download the source either via the releases tab or by downloading or cloning this git repository
  3. Go to lib/LED_clock and choose one of the library_*.json files and rename it to library.json
  4. Check that you have all the above mentioned Platform IO libraries installed either system wide or in the project itself.
  5. If you want to modify any of the configuration options you can do so by editing the files in lib/LED_clock/Config/Setup/<chosen_version>
  6. Build and upload

If you want a more detailed walk through of the installation process take a look at the setup wiki page.

Support

First of all thanks to DIY machines for the awesome idea!

Also thank you to the great people who developed the libraries that I am using for this project:

  • Volodymyr Shymanskyy for the Blynk library
  • Daniel Garcia for the FastLED library
  • Ivan Seidel for his LinkedList implementation
  • Andy Brown for the Easings library that I modified a bit to suit my needs better

If you would like to say thank you: donate

led-clockshelf's People

Contributors

florianl21 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

led-clockshelf's Issues

Blynk Setup

Hi

I've tried to use your QR code for the simple Blynk app but Blynk gives me an "invalid token message". Can you help?

TimeManager failed to get Time from NTP Server

Hey Florian,

my clock was already running for 1 year until Blynk switched off the server. Now I've changed the config to Blynk 2.0. I now get the error message: TimeManager failed to get Time from NTP Server

Do you have any idea?

lease build project in debug configuration to get more details about an exception.
See https://docs.platformio.org/page/projectconf/build_configurations.html

--- Terminal on COM3 | 115200 8-N-1
--- Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at https://bit.ly/pio-monitor-filters
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
ets..Reconnect successful
Waiting for loading animation to finish...
OTA update functionality is ready
IP address: 192.168.2.159
[3206]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
/
//_, /////_
/
__/ v1.1.0 on ESP32

#StandWithUkraine https://bit.ly/swua

Starting blynk on core 0...
Fetching time from NTP server...
Loop task running on core 0
[3228] Connecting to blynk.cloud:80
[3289] Ready (ping: 21ms).
[E]: TimeManager failed to get time from NTP server
[E]: TimeManager failed to get time from NTP server
[E]: TimeManager failed to get time from NTP server
[E]: TimeManager failed to get time from NTP server
[E]: TimeManager failed to get time from NTP server
[E]: TimeManager failed to get time from NTP server
[E]: TimeManager failed to get time from NTP server
[E]: TimeManager failed to get time from NTP server
[E]: TimeManager failed to get time from NTP server
[E]: TimeManager failed to get time from NTP server
[E]: TimeManager failed to get time from NTP server

Greetings from Germany

File corrupted since updated code

Hello Florian,

I am currently using my clock with the old code for over a year and I am very happy with it.
Unfortunately, due to the recent shutdown of the old Blynk servers, I was forced to update the clock to the new version.
I made the adjustments as with the old code and also tried various other variants to get the clock running. However, it keeps restarting itself. A file appears to be corrupt in the serial log.
Could you please help me to find the error?

Best regards
Aaron

--- Terminal on COM5 | 115200 8-N-1
--- Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time                                                                                       
--- More details at https://bit.ly/pio-monitor-filters
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
..Reconnect successful
Waiting for loading animation to finish...
OTA update functionality is ready
IP address: 192.168.178.96
[3205]
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v1.2.0 on ESP32

 #StandWithUkraine    https://bit.ly/swua


Starting blynk on core 0...
Fetching time from NTP server...
Loop task running on core 0
[3227] Connecting to blynk.cloud:80
[3294] Ready (ping: 13ms).
Displaying startup animation...
Setup done. Main Loop starting...

abort() was called at PC 0x4008500f on core 1


Backtrace:0x40083b29:0x3ffbeedc |<-CORRUPTED




ELF file SHA256: 0000000000000000

Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5828
entry 0x400806a8
..Reconnect successful
Waiting for loading animation to finish...
OTA update functionality is ready
 #StandWithUkraine    https://bit.ly/swua


Starting blynk on core 0...
Fetching time from NTP server...
Loop task running on core 0
[3229] Connecting to blynk.cloud:80
Displaying startup animation...
[3288] Ready (ping: 14ms).
Setup done. Main Loop starting...

Make configuration dynamic

Currently the configuration is done statically via precompiler defines.
This should be changed to happen dynamically on startup.
Current approach:

  • use a json file stored in the filesystem of the ESP to make the config persistent through reboots

Light sensor working backwards

as the room gets brighter the clock dims
as the room gets darker the clock gets brighter
i feel it should be the other way around

Segment error when uplaoding

Hi there,

Appreciate all the work you have done here. Hoping you might be able to assist me. I created the DIY machines version of the setup and want to swap to the esp32 so my LED's are wired as per the DIY machines walkthrough. Am I correct the if the use the DIY_machines.json file it will take this into account?

If this is so I have tried this and unfortunately receive the following errors

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13192
load:0x40080400,len:3028
entry 0x400805e4
[W] Segment not valid; Position: 4; Display: 3
[W] Segment not valid; Position: 0; Display: 3
[W] Segment not valid; Position: 1; Display: 3
[W] Segment not valid; Position: 5; Display: 3
[W] Segment not valid; Position: 4; Display: 3
[W] Segment not valid; Position: 4; Display: 3
[W] Segment not valid; Position: 0; Display: 3
[W] Segment not valid; Position: 0; Display: 3
[W] Segment not valid; Position: 1; Display: 3
[W] Segment not valid; Position: 1; Display: 3
[W] Segment not valid; Position: 5; Display: 3
[W] Segment not valid; Position: 5; Display: 3
[E] Complex animtation start point was empty. Animation step (0) was not started.
.E (662) wifi:Association refused temporarily, comeback time 1048 mSec
.....Reconnect successful
Waiting for loading animation to finish...
OTA update functionality is ready
IP address: 192.168.XXX.XXX
Fetching time from NTP server...
Displaying startup animation...
Setup done. Main Loop starting...

If I upload the 12h-extended version for testing it uploads and shows no errors.

Any assistance is appreciated. Please let me know if I need to provide further information.

Many Thanks

Clock Fades off always

I cant seem to get this to work i have tried tons of setting for the light sensor and nothing will keep the clock on it comes up goes thru animation then shows clock then fades away even does this if i turn off the light sensor any ideas?
i can watch the reading of the light sensor in the serial and i dont see anything change to make it fade off seems lower number brightness makes it brighter and higher is less i have changed ranges i had it at 194 for 10 min then changed some settings and had it at 25 and both do the same

Dynamic config

Hello, thank you for your project.
I flashed and tested version 1, it works fine with Blynk local server.
I flashed the dynamic-config version but I do not have access to the webUI page and I do not have access to my Blynk local server.

Thank you for your help.

John.

System freeze

After several weeks of work I finally finished making the shelf.
The leds are installed and the printed covers are in place.
I programmed my esp32 and wired it to the leds through a 74AHCT125N levelshifter.
Everything works fine but after a few minutes (between 5 and 10 minutes) the system freezes.
I don't understand what causes this freeze.
Do you have any ideas?
PS: thank you for this great project

Change Colour without Blank

Is it possible to change the colors without the Blynk app? Unfortunately, Blynk has become very expensive to fully utilize.
Greetings: André

Move github wiki docu to readTheDocs

has to be done after #3 was closed

  • Add a sphinx config and add and update all the info currently available in the github wiki for version 2.0 of the source code.
  • Create an automated job on Read the docs to automatically generate the documentation on every push to master.

Offset for Downlight Brightness

Hey,

i thanks a lot for the nice code, which you/r have wrote.
I have invested many hours to get your code to work on my installed clock. had to modified to 24h format, 0 off in the higher hour digit and many more....
So i hope you can help me and give me the solution, that i not have to search many other hours for it.

I want to get a offset to get the Brightness of the Downlight brighter. is there any point which i can insert it in the code whichout to modify anything?

Best regards.
Cayn183

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.