Skip to content

Added motion sensor support

Compare
Choose a tag to compare
@judge2005 judge2005 released this 30 Mar 03:57
· 14 commits to master since this release

Overview

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

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

Installing this release will reset all of your settings.

New in This Release

Added motion sensor support. You can wire the sensor output to the RX input on the programming header. Pull power as needed from the 5V test point and ground. It assumes that the sensor is active-high at 3V3 on the RX pin, which both of mine are. If no sensor is attached, the clock will stay on.

There is another slider on the Extra screen that controls how long the clock will stay on after the last time that the motion sensor was activated. If the clock is in scheduled off-time, it won’t react to the motion sensor

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 ck -cb 115200 -cp <port name> -ca 0 -cf ITS1A.bin
  2. esptool -cd ck -cb 115200 -cp <port name> -ca 0xBB000 -cf spiffs.bin

Installation (Full Version)

This is the step-by-step guide:

  1. You will need a programming tool for the ESP-01. If you socketed the ESP-01 you can remove it from the clock (turn it off first!) and insert it into the programmer. Or you can use the header on the clock itself.
  2. Download esptool-ck for your platform and unzip/untar/whatever it somewhere. You will use this to upload the bin files to the clock.
  3. Download these bin files and put them in the same folder as esptool-ck (for convenience).
  4. Plug the programmer into you computer's USB port and the other end into the clock or ESP-01.
  5. 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.
  6. In the shell you just opened, change directory to where esptool is.
  7. 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 ck -cb 115200 -cp COM10 -ca 0 -cf ITS1A.bin
    You should see some text saying it is uploading, and a bunch of dots.
  8. Upload the spiffs, again replace COM10 with whatever your serial port is called:
    esptool -cd ck -cb 115200 -cp COM10 -ca 0xBB000 -cf spiffs.bin