Skip to content

Added inter-clock syncing, fixed timer bug

Compare
Choose a tag to compare
@judge2005 judge2005 released this 22 Dec 00:48
· 4 commits to master since this release

Overview

This release contains binary files for my One Tube Clock. They won't work for anything else. There are two files:

  • SingleTubeClock.bin - this is the executable code
  • spiffs.bin - this is the web GUI

New in this Release

  • Fixes a bug with timer rollover math
  • Adds an extra mode to the four-tube multiplexed clock
  • Adds inter-clock syncing which syncs animations and the led backlights.

Inter-clock syncing is only useful if you have more than once clock. One clock can be designated as a master and the others as slaves. The master will periodically send a sync message to the slaves after which the time display animations and led lighting should be in sync. However, you still have to configure each clock individually to use the same settings for time, display durations etc.

Installing this release will reset all your settings.

Installation (Abbreviated version)

OK, so this isn't the first time you've done this. These are the commands you need to remember:

  1. esptool -cd nodemcu -cb 115200 -cp <port name> -ca 0 -cf SingleTubeClock.bin
  2. esptool -cd nodemcu -cb 115200 -cp <port name> -ca 0xBB000 -cf spiffs.bin

Installation (Full Version)

This is the step-by-step guide:
Note: installing these files will probably lose your current settings. You will have to re-enter them in the GUI.

  1. Download esptool-ck for your platform and unzip/untar/whatever it somewhere. You will use this to upload the bin files to the clock.
  2. Download these bin files and put the in the same folder (for convenience).
  3. Plug the clock in to your computer using a USB cable that supports syncing - most do these days. If it doesn't, nothing bad will happen. In fact nothing will happen. If this is the first time you have plugged it in, it should install a device driver. If it doesn't, you will need to install CP2102 device drivers. You can get some from Silicon Labs
  4. Figure out what the serial port is called - you will need to know this to upload the files. On windows you can open a command shell and type mode to find out.
  5. In the shell you just opened, change directory to where esptool is.
  6. Upload the binary file with this command - change the -cp value to whatever your serial port is called - here it is called COM10.
    esptool -cd nodemcu -cb 115200 -cp COM10 -ca 0 -cf SingleTubeClock.bin
    You should see some text saying it is uploading, and a bunch of dots.
  7. Upload the spiffs, again replace COM10 with whatever your serial port is called:
    esptool -cd nodemcu -cb 115200 -cp COM10 -ca 0xBB000 -cf spiffs.bin