Giter Site home page Giter Site logo

dual_clock's Introduction

Dual_Clock

This is a work in progress although I have a working clock.

Clock with two displays -- a big red HT16K33 which is easy to read from many angles and a smaller TFT to display temperature, humidity etc. The clock uses a Neo 7M GPS receiver to get a very accurate time.

The clock is still in developent and not all features are complete. At the moment, accurate time is displayed once the GPS receiver has a fix.

The time zone info in TimeSource.cpp can be edited to suit different time zones.

Many mods are possible to suit different hardware.

The version I am building uses a Waveshare ESP32 S3 Zero MCU. This is slight overkill, but it a nice small package. The code could probably be made to work in a much cheaper D1 Mini with an ESP8266.

Much more info to follow. Questions welcome.

Code

As an experiment, I implemented everything using namespaces instead of classes. I'd heard some harsh criticism of OOP and wanted to experiment with the alternatives. I actually prefer this approach when there is only going to one instance of a thing. The code seems to be shorter and easier to understand. Each namespace is decoupled from the others -- everything is tied together in main.cpp.

The code is written in, and designed for, vscode & PlatformIO. A bit of moving & renaming of main.cpp would probably be all that's needed to compile it in Arduino IDE. But why?

platformio.ini is configured for an adafruit_feather_esp32s3 which is the closest I could find to the spec of my Waveshare ESP32 S3 Zero. These boards both have 4Mb RAM unlike other S3 boards which have 8Mb. It took a while to figure out why the MCU was crashing.

Parts

Find the Parts List in the Wiki

WiFi & Alexa

Dual Clock uses the WiFiManager library to get WiFi credentials obviating the need for hard coded SSID & password.

By default, the clock connects to WiFi and emulates a Phillips bulb using the fauxmoESP library. The brightness can be adjusted and the displays turned off using Alexa. This feature can be easily removed in main.cpp.

Case

You can download my case design from the Wiki

TFT_eSPI configutation

Move resources/User_Setup.h to your TFT_eSPI directory which will be somwhere in .pio/libdeps. You will need to edit this file to suit your MCU & TFT unless you are using exactly the same devices as me.

dual_clock's People

Contributors

mikethegent avatar

Watchers

 avatar

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.