Wiki
Clone wikiblinkclock / Home
ESP8266-12E Blink Clock
Requirements
- A Windows, OSX, or Linux computer with an available USB port and some developer tools (make, git)
- A micro-USB cable
- An ESP8266 development board
Setup Procedure
1. Install the Arduino IDE
Download the Arduino IDE for your operating system and install with the following instructions:
2. Configure the ESP8266 Board Manager
Once the Arduino IDE is available we can add support for the development boards we'll be using.
- Launch the Arduino application
- Select the "File" menu ("Arduino" menu on OSX), then "Preferences"
- Paste the following URL in the box labeled "Additional Boards Manager URLs":
http://arduino.esp8266.com/stable/package_esp8266com_index.json
- While we're here, check "Display line numbers"
- Click OK to accept the changes
- Select the "Tools" menu, "Board" menu, then "Boards Manager"
- Search for ESP8266, click on the "esp8266" board and select "Install"
2.1 Set default board
To avoid having to select the ESP12-E board every time you start, you can save it in the preferences.txt file. Open the Arduino preference, near the bottom is a link to the preferences.txt.
Change the first line, from board=uno
to board=nodemcuv2
3. Install Serial Drivers
The board has a CH341 USB-to-serial chipset which requires drivers on many systems.
Windows 10
No driver is required and the device should plug and play.
Windows 7/8
Click here to download the Windows driver from the chipset manufacturer's website.
Mac OSX
Click here to download the signed driver that will work in OSX Sierra.
Click here to download the OSX driver from the chipset manufacturer's website. This driver DOES NOT WORK for OSX Sierra...it causes kernel panics.
Linux
Click here to download the drivers from the manufacturer's site.
4. Install SPIFFS Filesystem tool plugin
The blink clock uses some of the flash as a filesystem (SPIFFs) to host the HTML. This requires a special plugin available here.
5. Install additional libraries
The blink clock uses some additional libraries that aren't included by default.
- Navigate to the "Sketch", "Include Library", "Manage Libraries"
- Search for "NTPClient" and install it.
- Search for "TaskScheduler" and install it.
- Search for "WifiManager" and install it.
- Search for "Time" and install it.
You'll also need a library that isn't part of the standard available libraries.
- Go to the Timezone on Github and click the Download ZIP button to download the repository as a ZIP file.
- Uncompress the downloaded file. This will result in a folder containing all the files for the library, that has a name that includes the branch name, for example Timezone-master.
- Rename the folder to just Timezone.
- Copy the renamed folder to the Arduino sketchbook\libraries folder.
6. Flash the device
Now you need to get the code on your device:
- Checkout the code.
- Navigate to the checked out blinkclock directory
- Run 'make'. This creates the data subdirectory to populate SPIFFS.
- Run 'make deploy', this gzips the asset files.
- Open blinkclock.ino in the Arduino IDE
- "Upload" the sketch to the device
- "ESP8266 Sketch data upload" to the device
If you're new to the Arduino environment, you may want to start with a basic intro
Updated