├── table
├── lib
├── Time
│ ├── Time.h
│ ├── desktop.ini
│ ├── examples
│ │ ├── desktop.ini
│ │ ├── Processing
│ │ │ ├── desktop.ini
│ │ │ └── SyncArduinoClock
│ │ │ │ ├── desktop.ini
│ │ │ │ ├── readme.txt
│ │ │ │ └── SyncArduinoClock.pde
│ │ ├── TimeGPS
│ │ │ ├── desktop.ini
│ │ │ └── TimeGPS.ino
│ │ ├── TimeNTP
│ │ │ ├── desktop.ini
│ │ │ └── TimeNTP.ino
│ │ ├── TimeRTC
│ │ │ ├── desktop.ini
│ │ │ └── TimeRTC.ino
│ │ ├── TimeRTCLog
│ │ │ ├── desktop.ini
│ │ │ └── TimeRTCLog.ino
│ │ ├── TimeRTCSet
│ │ │ ├── desktop.ini
│ │ │ └── TimeRTCSet.ino
│ │ ├── TimeSerial
│ │ │ ├── desktop.ini
│ │ │ └── TimeSerial.ino
│ │ ├── TimeArduinoDue
│ │ │ ├── desktop.ini
│ │ │ └── TimeArduinoDue.ino
│ │ ├── TimeTeensy3
│ │ │ ├── desktop.ini
│ │ │ └── TimeTeensy3.ino
│ │ ├── TimeNTP_ESP8266WiFi
│ │ │ ├── desktop.ini
│ │ │ └── TimeNTP_ESP8266WiFi.ino
│ │ └── TimeSerialDateStrings
│ │ │ ├── desktop.ini
│ │ │ └── TimeSerialDateStrings.ino
│ ├── library.properties
│ ├── library.json
│ ├── keywords.txt
│ ├── DateStrings.cpp
│ ├── TimeLib.h
│ └── Readme.txt
├── NTP
│ ├── keywords.txt
│ ├── .gitattributes
│ ├── .gitignore
│ ├── ntp.h
│ ├── ntp.cpp
│ └── Examples
│ │ └── WiFiClock
│ │ └── WiFiClock.ino
├── desktop.ini
├── arduinoWebSockets-master
│ ├── desktop.ini
│ ├── src
│ │ ├── desktop.ini
│ │ ├── libb64
│ │ │ ├── desktop.ini
│ │ │ ├── AUTHORS
│ │ │ ├── cdecode_inc.h
│ │ │ ├── cencode_inc.h
│ │ │ ├── LICENSE
│ │ │ ├── cdecode.c
│ │ │ └── cencode.c
│ │ ├── libsha1
│ │ │ ├── desktop.ini
│ │ │ └── libsha1.h
│ │ └── WebSocketsClient.h
│ ├── examples
│ │ ├── desktop.ini
│ │ ├── Nginx
│ │ │ ├── desktop.ini
│ │ │ └── esp8266.ssl.reverse.proxy.conf
│ │ ├── WebSocketClient
│ │ │ ├── desktop.ini
│ │ │ └── WebSocketClient.ino
│ │ ├── WebSocketServer
│ │ │ ├── desktop.ini
│ │ │ ├── WebSocketServer.ino
│ │ │ └── WebSocketServerHttpHeaderValidation.ino
│ │ ├── WebSocketClientAVR
│ │ │ ├── desktop.ini
│ │ │ └── WebSocketClientAVR.ino
│ │ ├── WebSocketClientSSL
│ │ │ ├── desktop.ini
│ │ │ └── WebSocketClientSSL.ino
│ │ └── WebSocketServer_LEDcontrol
│ │ │ ├── desktop.ini
│ │ │ └── WebSocketServer_LEDcontrol.ino
│ ├── tests
│ │ ├── desktop.ini
│ │ ├── webSocketServer
│ │ │ ├── desktop.ini
│ │ │ ├── package.json
│ │ │ └── index.js
│ │ └── webSocket.html
│ ├── library.properties
│ ├── .gitignore
│ ├── library.json
│ └── README.md
├── NeoPixelBus
│ ├── .gitattributes
│ ├── .gitignore
│ ├── examples
│ │ ├── NeoPixelTest
│ │ │ └── NeoPixelTest.pde
│ │ └── NeoPixelFun
│ │ │ └── NeoPixelFun.pde
│ ├── NeoPixelAnimator.h
│ ├── HslColor.h
│ ├── HslColor.cpp
│ ├── RgbColor.cpp
│ ├── NeoPixelAnimator.cpp
│ ├── NeoPixelBus.h
│ ├── RgbColor.h
│ └── NeoPixelesp8266.c
└── readme.txt
├── .gitignore
├── druhvhtml
├── Menu.zip
├── desktop.ini
├── Menu
│ ├── desktop.ini
│ └── index.html
├── compressed
│ ├── desktop.ini
│ ├── compressed.html
│ └── compressed.css
└── settings.html
├── firmware 1.1.1 bug fixes.bin
├── lightclock 1.1 - sun and moon.bin
├── desktop.ini
├── .piolibdeps
└── desktop.ini
├── thelightclockwifi
└── desktop.ini
├── h
├── importfonts.h
├── clearromsure.h
├── send_progmem.h
├── password.h
├── webconfig.h
├── buttongradient.h
├── externallinks.h
├── timezone.h
├── alarm.h
├── root.h
├── colourjs.h
└── game.h
├── .gitattributes
├── html
├── clearromsure.html
├── password.html
├── timezonesetup.html
├── testwebsock.html
├── advancedserverhtml.html
├── webconfig.html
├── timezone.html
├── alarm.html
└── index.html
├── notes
├── memory usage.txt
└── memory values.csv
├── readme.md
├── platformio.ini
├── .travis.yml
└── Colour.js
/table:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/Time/Time.h:
--------------------------------------------------------------------------------
1 | #include "TimeLib.h"
2 |
--------------------------------------------------------------------------------
/lib/NTP/keywords.txt:
--------------------------------------------------------------------------------
1 | NTP KEYWORD1
2 | begin KEYWORD2
3 | getNtpTime KEYWORD2
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.pioenvs
2 | *.clang_complete
3 | *.gcc-flags.json
4 | *.piolibdeps
5 | *.tmp
--------------------------------------------------------------------------------
/druhvhtml/Menu.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chrismelba/lightclockwifiv2/HEAD/druhvhtml/Menu.zip
--------------------------------------------------------------------------------
/firmware 1.1.1 bug fixes.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chrismelba/lightclockwifiv2/HEAD/firmware 1.1.1 bug fixes.bin
--------------------------------------------------------------------------------
/lightclock 1.1 - sun and moon.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chrismelba/lightclockwifiv2/HEAD/lightclock 1.1 - sun and moon.bin
--------------------------------------------------------------------------------
/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/Time/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/.piolibdeps/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/druhvhtml/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/druhvhtml/Menu/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/Time/examples/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/thelightclockwifi/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/druhvhtml/compressed/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/Time/examples/Processing/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/Time/examples/TimeGPS/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/Time/examples/TimeNTP/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/Time/examples/TimeRTC/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/Time/examples/TimeRTCLog/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/Time/examples/TimeRTCSet/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/Time/examples/TimeSerial/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/arduinoWebSockets-master/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/Time/examples/TimeArduinoDue/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/Time/examples/TimeTeensy3/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/arduinoWebSockets-master/src/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/Time/examples/TimeNTP_ESP8266WiFi/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/arduinoWebSockets-master/examples/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/arduinoWebSockets-master/tests/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/Time/examples/TimeSerialDateStrings/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/arduinoWebSockets-master/examples/Nginx/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/arduinoWebSockets-master/src/libb64/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/arduinoWebSockets-master/src/libsha1/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/Time/examples/Processing/SyncArduinoClock/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/arduinoWebSockets-master/examples/WebSocketClient/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/arduinoWebSockets-master/examples/WebSocketServer/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/arduinoWebSockets-master/tests/webSocketServer/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/arduinoWebSockets-master/examples/WebSocketClientAVR/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/arduinoWebSockets-master/examples/WebSocketClientSSL/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/arduinoWebSockets-master/examples/WebSocketServer_LEDcontrol/desktop.ini:
--------------------------------------------------------------------------------
1 | [.ShellClassInfo]
2 | InfoTip=This folder is shared online.
3 | IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
4 | IconIndex=16
5 |
--------------------------------------------------------------------------------
/lib/arduinoWebSockets-master/src/libb64/AUTHORS:
--------------------------------------------------------------------------------
1 | libb64: Base64 Encoding/Decoding Routines
2 | ======================================
3 |
4 | Authors:
5 | -------
6 |
7 | Chris Venter chris.venter@gmail.com http://rocketpod.blogspot.com
8 |
--------------------------------------------------------------------------------
/h/importfonts.h:
--------------------------------------------------------------------------------
1 | const char importfonts[] PROGMEM = R"=====(
2 |
5 | )=====";
6 |
--------------------------------------------------------------------------------
/lib/arduinoWebSockets-master/library.properties:
--------------------------------------------------------------------------------
1 | name=WebSockets
2 | version=2.0.2
3 | author=Markus Sattler
4 | maintainer=Markus Sattler
5 | sentence=WebSockets for Arduino (Server + Client)
6 | paragraph=use 2.x.x for ESP and 1.3 for AVR
7 | category=Communication
8 | url=https://github.com/Links2004/arduinoWebSockets
9 | architectures=*
10 |
--------------------------------------------------------------------------------
/lib/Time/library.properties:
--------------------------------------------------------------------------------
1 | name=Time
2 | version=1.5
3 | author=Michael Margolis
4 | maintainer=Paul Stoffregen
5 | sentence=Timekeeping functionality for Arduino
6 | paragraph=Date and Time functions, with provisions to synchronize to external time sources like GPS and NTP (Internet). This library is often used together with TimeAlarms and DS1307RTC.
7 | category=Timing
8 | url=http://playground.arduino.cc/code/time
9 | architectures=*
10 |
11 |
--------------------------------------------------------------------------------
/lib/arduinoWebSockets-master/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files
2 | *.slo
3 | *.lo
4 | *.o
5 | *.obj
6 |
7 | # Precompiled Headers
8 | *.gch
9 | *.pch
10 |
11 | # Compiled Dynamic libraries
12 | *.so
13 | *.dylib
14 | *.dll
15 |
16 | # Fortran module files
17 | *.mod
18 |
19 | # Compiled Static libraries
20 | *.lai
21 | *.la
22 | *.a
23 | *.lib
24 |
25 | # Executables
26 | *.exe
27 | *.out
28 | *.app
29 | /tests/webSocketServer/node_modules
30 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/lib/NTP/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/lib/NeoPixelBus/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/lib/Time/examples/Processing/SyncArduinoClock/readme.txt:
--------------------------------------------------------------------------------
1 | SyncArduinoClock is a Processing sketch that responds to Arduino requests for
2 | time synchronization messages.
3 |
4 | The portIndex must be set the Serial port connected to Arduino.
5 |
6 | Download TimeSerial.pde onto Arduino and you should see the time
7 | message displayed when you run SyncArduinoClock in Processing.
8 | The Arduino time is set from the time on your computer through the
9 | Processing sketch.
10 |
--------------------------------------------------------------------------------
/lib/Time/library.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Time",
3 | "frameworks": "Arduino",
4 | "keywords": "Time, date, hour, minute, second, day, week, month, year, RTC",
5 | "description": "Time keeping library",
6 | "url": "http://playground.arduino.cc/Code/Time",
7 | "authors":
8 | [
9 | {
10 | "name": "Michael Margolis"
11 | },
12 | {
13 | "name": "Paul Stoffregen"
14 | }
15 | ],
16 | "repository":
17 | {
18 | "type": "git",
19 | "url": "https://github.com/PaulStoffregen/Time"
20 | }
21 | }
22 |
23 |
--------------------------------------------------------------------------------
/lib/arduinoWebSockets-master/library.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "WebSockets",
3 | "keywords": "wifi, http, web, server, client, websocket",
4 | "description": "WebSocket Server and Client for Arduino based on RFC6455",
5 | "repository":
6 | {
7 | "type": "git",
8 | "url": "https://github.com/Links2004/arduinoWebSockets.git"
9 | },
10 | "exclude": "tests",
11 | "frameworks": "arduino",
12 | "platforms": "*",
13 | "authors":
14 | {
15 | "name": "Markus Sattler",
16 | "url": "https://github.com/Links2004",
17 | "maintainer": true
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/html/clearromsure.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Are you sure?
10 | This will clear all settings including your wifi password. When The Light Clock reboots please connect to it to set up local wifi again.
11 | Reset to factory default
12 |
13 |
--------------------------------------------------------------------------------
/h/clearromsure.h:
--------------------------------------------------------------------------------
1 | const char clearromsure_html[] PROGMEM = R"=====(
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Are you sure?
10 | This will clear all settings including your wifi password. When The Light Clock reboots please connect to it to set up local wifi again.
11 | Reset to factory default
12 |
13 |
14 | )=====";
15 |
--------------------------------------------------------------------------------
/lib/arduinoWebSockets-master/src/libsha1/libsha1.h:
--------------------------------------------------------------------------------
1 | /* ================ sha1.h ================ */
2 | /*
3 | SHA-1 in C
4 | By Steve Reid
5 | 100% Public Domain
6 | */
7 |
8 | #ifndef ESP8266
9 |
10 | typedef struct {
11 | uint32_t state[5];
12 | uint32_t count[2];
13 | unsigned char buffer[64];
14 | } SHA1_CTX;
15 |
16 | void SHA1Transform(uint32_t state[5], const unsigned char buffer[64]);
17 | void SHA1Init(SHA1_CTX* context);
18 | void SHA1Update(SHA1_CTX* context, const unsigned char* data, uint32_t len);
19 | void SHA1Final(unsigned char digest[20], SHA1_CTX* context);
20 |
21 | #endif
--------------------------------------------------------------------------------
/h/send_progmem.h:
--------------------------------------------------------------------------------
1 | template
2 | size_t sendProgmem(WiFiClient client, const prog_char (&str)[N])
3 | {
4 | return sendProgmem(client, str, N);
5 | }
6 |
7 | size_t sendProgmem(WiFiClient client, const prog_char progmem[], size_t size) {
8 | size_t maxSize=2920; // this seems to be the max that write() will ever actually send
9 | size_t sent=0;
10 |
11 | while(sent < size) {
12 | size_t sendSize = (maxSize < (size - sent)) ? maxSize : (size - sent);
13 | sent += client.write(progmem+sent, sendSize); // write() may send less than you asked it to
14 | }
15 | return sent;
16 | }
17 |
18 |
--------------------------------------------------------------------------------
/notes/memory usage.txt:
--------------------------------------------------------------------------------
1 | memory usage:
2 |
3 | added version 1: (magic byte = 196)
4 | 0-31: ssid
5 | 32-95: password
6 | 100-124: face1
7 | 125-149: face2
8 | 150-174: face3
9 |
10 | 175-176: lat
11 | 177-178: long
12 | 179: timezone
13 | 180: random mode
14 | 181: hour marks
15 | 182: sleep
16 | 183: sleepmin
17 | 184: showseconds
18 | 185: DSTauto
19 | 186: webMode
20 | 187-188: timezone
21 | 189: wake
22 | 190: wakemin
23 | 191: brightness
24 | 192: DSTtime
25 | 193: hourofdeath
26 | 194: minuteofdeath
27 | 195-227: clockname
28 |
29 | added version 1.1: (magic byte = 2)
30 | 228: sleeptype
31 | 229: dawnbreak
32 | 230: pixelCount
33 | 231: maxBrightness
34 |
35 |
36 | 509-511: magic first-boot byte c4
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | # The Light Clock
2 |
3 | 
4 |
5 | This is a project to create a clock out of an ESP8266 chip and a string of neopixel LEDs. The project was released on a successful [kickstarter!](https://www.kickstarter.com/projects/1054187792/the-light-clock?token=00673970) in 2017
6 |
7 | In this repo are compiled binaries for the latest two firmware patches, plus all the code if you wish to modify for your device
8 |
9 | Instructions on building the light clock can be found on [instructables!](https://www.instructables.com/id/The-Light-Clock-IoT/)
10 |
--------------------------------------------------------------------------------
/lib/NTP/.gitignore:
--------------------------------------------------------------------------------
1 | # Windows image file caches
2 | Thumbs.db
3 | ehthumbs.db
4 |
5 | # Folder config file
6 | Desktop.ini
7 |
8 | # Recycle Bin used on file shares
9 | $RECYCLE.BIN/
10 |
11 | # Windows Installer files
12 | *.cab
13 | *.msi
14 | *.msm
15 | *.msp
16 |
17 | # Windows shortcuts
18 | *.lnk
19 |
20 | # =========================
21 | # Operating System Files
22 | # =========================
23 |
24 | # OSX
25 | # =========================
26 |
27 | .DS_Store
28 | .AppleDouble
29 | .LSOverride
30 |
31 | # Thumbnails
32 | ._*
33 |
34 | # Files that might appear on external disk
35 | .Spotlight-V100
36 | .Trashes
37 |
38 | # Directories potentially created on remote AFP share
39 | .AppleDB
40 | .AppleDesktop
41 | Network Trash Folder
42 | Temporary Items
43 | .apdisk
44 |
--------------------------------------------------------------------------------
/html/password.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | $fonts
4 | $css
5 |
6 |
7 |
8 |
9 |
10 |
11 | Network -> Password -> Timezone
12 | Choose Your Network
13 |
18 |
19 |
--------------------------------------------------------------------------------
/lib/NeoPixelBus/.gitignore:
--------------------------------------------------------------------------------
1 | # Windows image file caches
2 | Thumbs.db
3 | ehthumbs.db
4 |
5 | # Folder config file
6 | Desktop.ini
7 |
8 | # Recycle Bin used on file shares
9 | $RECYCLE.BIN/
10 |
11 | # Windows Installer files
12 | *.cab
13 | *.msi
14 | *.msm
15 | *.msp
16 |
17 | # Windows shortcuts
18 | *.lnk
19 |
20 | # =========================
21 | # Operating System Files
22 | # =========================
23 |
24 | # OSX
25 | # =========================
26 |
27 | .DS_Store
28 | .AppleDouble
29 | .LSOverride
30 |
31 | # Thumbnails
32 | ._*
33 |
34 | # Files that might appear on external disk
35 | .Spotlight-V100
36 | .Trashes
37 |
38 | # Directories potentially created on remote AFP share
39 | .AppleDB
40 | .AppleDesktop
41 | Network Trash Folder
42 | Temporary Items
43 | .apdisk
44 |
--------------------------------------------------------------------------------
/platformio.ini:
--------------------------------------------------------------------------------
1 | #
2 | # Project Configuration File
3 | #
4 | # A detailed documentation with the EXAMPLES is located here:
5 | # http://docs.platformio.org/en/latest/projectconf.html
6 | #
7 |
8 | # A sign `#` at the beginning of the line indicates a comment
9 | # Comment lines are ignored.
10 |
11 | # Simple and base environment
12 | # [env:mybaseenv]
13 | # platform = %INSTALLED_PLATFORM_NAME_HERE%
14 | # framework =
15 | # board =
16 | #
17 | # Automatic targets - enable auto-uploading
18 | # targets = upload
19 |
20 | [env:nodemcuv2]
21 | platform=espressif8266
22 | framework=arduino
23 | board=nodemcuv2
24 | <<<<<<< HEAD
25 | //upload_port=thelightclock.local/update
26 | =======
27 | upload_port=thelightclock.local/update
28 | >>>>>>> origin/master
29 |
30 | [platformio]
31 | src_dir=.
32 |
--------------------------------------------------------------------------------
/lib/arduinoWebSockets-master/tests/webSocketServer/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "webSocketServer",
3 | "version": "1.0.0",
4 | "description": "WebSocketServer for testing",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "repository": {
10 | "type": "git",
11 | "url": "https://github.com/Links2004/arduinoWebSockets"
12 | },
13 | "keywords": [
14 | "esp8266",
15 | "websocket",
16 | "arduino"
17 | ],
18 | "author": "Markus Sattler",
19 | "license": "LGPLv2",
20 | "bugs": {
21 | "url": "https://github.com/Links2004/arduinoWebSockets/issues"
22 | },
23 | "homepage": "https://github.com/Links2004/arduinoWebSockets",
24 | "dependencies": {
25 | "websocket": "^1.0.18"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/lib/arduinoWebSockets-master/src/libb64/cdecode_inc.h:
--------------------------------------------------------------------------------
1 | /*
2 | cdecode.h - c header for a base64 decoding algorithm
3 |
4 | This is part of the libb64 project, and has been placed in the public domain.
5 | For details, see http://sourceforge.net/projects/libb64
6 | */
7 |
8 | #ifndef BASE64_CDECODE_H
9 | #define BASE64_CDECODE_H
10 |
11 | typedef enum
12 | {
13 | step_a, step_b, step_c, step_d
14 | } base64_decodestep;
15 |
16 | typedef struct
17 | {
18 | base64_decodestep step;
19 | char plainchar;
20 | } base64_decodestate;
21 |
22 | void base64_init_decodestate(base64_decodestate* state_in);
23 |
24 | int base64_decode_value(char value_in);
25 |
26 | int base64_decode_block(const char* code_in, const int length_in, char* plaintext_out, base64_decodestate* state_in);
27 |
28 | #endif /* BASE64_CDECODE_H */
29 |
--------------------------------------------------------------------------------
/h/password.h:
--------------------------------------------------------------------------------
1 | const char password_html[] PROGMEM = R"=====(
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | Network -> Password -> Timezone
11 | Password
12 |
17 |
18 |
19 |
20 | )=====";
21 |
--------------------------------------------------------------------------------
/notes/memory values.csv:
--------------------------------------------------------------------------------
1 | 179: timezone,timezone,between -12 and +12
2 | 181: hour marks,hour marks,"0, 1 or 2 for various settings"
3 | 182: sleep,sleep,hour of sleep time (0-23)
4 | 183: sleepmin,sleepmin,minutes of sleep time (0-59)
5 | 184: showseconds,showseconds,0 or 1
6 | 186: webMode,webMode,debugging
7 | 189: wake,wake,hour of wake time (0-23)
8 | 190: wakemin,wakemin,minutes of wake time (0-59)
9 | 191: brightness,brightness,current brightness (between 0 and 255)
10 | 192: DSTtime,DSTtime,DST or not (0 or 1)
11 | 195: clockname,clockname,for mdsn responder (string)
12 | 228: sleeptype,sleeptype,"int between 0 and 4 (dim, dots, moon, disabled)"
13 | 229: dawnbreak,dawnbreak,0 or 1 for on or off
14 | 230: pixelCount,pixelCount,0 to 255 to allow for different length LED strings
15 | 231: maxBrightness,maxBrightness,0 to 255 to allow for USB power vs mains power
16 |
--------------------------------------------------------------------------------
/lib/arduinoWebSockets-master/src/libb64/cencode_inc.h:
--------------------------------------------------------------------------------
1 | /*
2 | cencode.h - c header for a base64 encoding algorithm
3 |
4 | This is part of the libb64 project, and has been placed in the public domain.
5 | For details, see http://sourceforge.net/projects/libb64
6 | */
7 |
8 | #ifndef BASE64_CENCODE_H
9 | #define BASE64_CENCODE_H
10 |
11 | typedef enum
12 | {
13 | step_A, step_B, step_C
14 | } base64_encodestep;
15 |
16 | typedef struct
17 | {
18 | base64_encodestep step;
19 | char result;
20 | int stepcount;
21 | } base64_encodestate;
22 |
23 | void base64_init_encodestate(base64_encodestate* state_in);
24 |
25 | char base64_encode_value(char value_in);
26 |
27 | int base64_encode_block(const char* plaintext_in, int length_in, char* code_out, base64_encodestate* state_in);
28 |
29 | int base64_encode_blockend(char* code_out, base64_encodestate* state_in);
30 |
31 | #endif /* BASE64_CENCODE_H */
32 |
--------------------------------------------------------------------------------
/h/webconfig.h:
--------------------------------------------------------------------------------
1 | const char webconfig_html[] PROGMEM = R"=====(
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Network -> Password -> Timezone
10 | Choose Your Network
11 |
19 |
20 |
21 |
22 | )=====";
23 |
--------------------------------------------------------------------------------
/lib/Time/keywords.txt:
--------------------------------------------------------------------------------
1 | #######################################
2 | # Syntax Coloring Map For Time
3 | #######################################
4 |
5 | #######################################
6 | # Datatypes (KEYWORD1)
7 | #######################################
8 | time_t KEYWORD1
9 | #######################################
10 | # Methods and Functions (KEYWORD2)
11 | #######################################
12 | now KEYWORD2
13 | second KEYWORD2
14 | minute KEYWORD2
15 | hour KEYWORD2
16 | day KEYWORD2
17 | month KEYWORD2
18 | year KEYWORD2
19 | isAM KEYWORD2
20 | isPM KEYWORD2
21 | weekday KEYWORD2
22 | setTime KEYWORD2
23 | adjustTime KEYWORD2
24 | setSyncProvider KEYWORD2
25 | setSyncInterval KEYWORD2
26 | timeStatus KEYWORD2
27 | TimeLib KEYWORD2
28 | #######################################
29 | # Instances (KEYWORD2)
30 | #######################################
31 |
32 | #######################################
33 | # Constants (LITERAL1)
34 | #######################################
35 |
--------------------------------------------------------------------------------
/lib/readme.txt:
--------------------------------------------------------------------------------
1 |
2 | This directory is intended for the project specific (private) libraries.
3 | PlatformIO will compile them to static libraries and link to executable file.
4 |
5 | The source code of each library should be placed in separate directory, like
6 | "lib/private_lib/[here are source files]".
7 |
8 | For example, see how can be organized `Foo` and `Bar` libraries:
9 |
10 | |--lib
11 | | |--Bar
12 | | | |--docs
13 | | | |--examples
14 | | | |--src
15 | | | |- Bar.c
16 | | | |- Bar.h
17 | | |--Foo
18 | | | |- Foo.c
19 | | | |- Foo.h
20 | | |- readme.txt --> THIS FILE
21 | |- platformio.ini
22 | |--src
23 | |- main.c
24 |
25 | Then in `src/main.c` you should use:
26 |
27 | #include
28 | #include
29 |
30 | // rest H/C/CPP code
31 |
32 | PlatformIO will find your libraries automatically, configure preprocessor's
33 | include paths and build them.
34 |
35 | See additional options for PlatformIO Library Dependency Finder `lib_*`:
36 |
37 | http://docs.platformio.org/en/latest/projectconf.html#lib-install
38 |
39 |
--------------------------------------------------------------------------------
/html/timezonesetup.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Time Zone
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Network ->
Password ->
Timezone
12 |
Set Timezone
13 |
14 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/h/buttongradient.h:
--------------------------------------------------------------------------------
1 | const char buttongradient_css[] PROGMEM = R"=====(
2 |
17 | )=====";
18 |
--------------------------------------------------------------------------------
/html/testwebsock.html:
--------------------------------------------------------------------------------
1 | "text/html", "LED Control:
R:
G:
B:
"
--------------------------------------------------------------------------------
/html/advancedserverhtml.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
Time Zone
4 |
5 |
12 |
Return without saving
13 |
Reset to factory default
14 |
15 |
36 |
37 |
--------------------------------------------------------------------------------
/h/externallinks.h:
--------------------------------------------------------------------------------
1 | const char externallinks[] PROGMEM = R"=====(
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | )=====";
17 |
18 |
19 |
20 | //
21 | //
22 | //
23 | //
24 | //
25 |
26 |
27 |
28 | //
29 | //
30 | //
31 | //
32 | //
33 |
--------------------------------------------------------------------------------
/html/webconfig.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
Network -> Password -> Timezone
11 |
Choose Your Network
12 |
24 |
25 |
26 |
27 |
28 |
38 |
--------------------------------------------------------------------------------
/lib/arduinoWebSockets-master/tests/webSocket.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
40 |
41 |
42 |
43 | LED Control:
44 |
45 | R:
46 | G:
47 | B:
48 |
49 |
--------------------------------------------------------------------------------
/lib/NTP/ntp.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | * NTP.h - gets current time from an NTP server or pool of servers.
3 | * This code is a modified version of the example "Time_NTP.pde" which
4 | * is included with the time library.
5 | * modified by William Moeur and made into a library: 28 MAY 2015.
6 | * This code is in the public domain.
7 | *****************************************************************************/
8 |
9 | #ifndef NTP_H
10 | #define NTP_H
11 |
12 | #include "IPAddress.h"
13 | #include "WiFiUdp.h"
14 | #include
15 | #include
16 |
17 |
18 | class NTP
19 | {
20 | public:
21 | NTP();
22 | void begin(const char* ntpServerName, float TimeZoneOffset);
23 | time_t getNtpTime(void);
24 | void updateTimeZone(float TimeZoneOffset);
25 |
26 |
27 | private:
28 | #define LOCALPORT 2390 // local port to listen on for UDP packets
29 | #define NTP_PACKET_SIZE 48 // NTP time stamp is in the first 48 bytes of the message
30 | #define seventyYears 2208988800UL // Unix time starts on Jan 1 1970. that's 2208988800 seconds
31 | //#define SECS_PER_HOUR 3600
32 |
33 | void sendNTPpacket(IPAddress &address);
34 | uint8_t DSToffset(time_t date);
35 |
36 | WiFiUDP UDP; // A UDP instance to let us send and receive packets over UDP
37 | uint8_t packetBuffer[ NTP_PACKET_SIZE]; //buffer to hold incoming and outgoing packets
38 | const char* _serverName;
39 | time_t _syncInterval = SECS_PER_HOUR;
40 | float _timeZoneOffset;
41 | };
42 |
43 | #endif /* NTP_H */
44 |
45 |
--------------------------------------------------------------------------------
/lib/Time/examples/TimeRTC/TimeRTC.ino:
--------------------------------------------------------------------------------
1 | /*
2 | * TimeRTC.pde
3 | * example code illustrating Time library with Real Time Clock.
4 | *
5 | */
6 |
7 | #include
8 | #include
9 | #include // a basic DS1307 library that returns time as a time_t
10 |
11 | void setup() {
12 | Serial.begin(9600);
13 | while (!Serial) ; // wait until Arduino Serial Monitor opens
14 | setSyncProvider(RTC.get); // the function to get the time from the RTC
15 | if(timeStatus()!= timeSet)
16 | Serial.println("Unable to sync with the RTC");
17 | else
18 | Serial.println("RTC has set the system time");
19 | }
20 |
21 | void loop()
22 | {
23 | if (timeStatus() == timeSet) {
24 | digitalClockDisplay();
25 | } else {
26 | Serial.println("The time has not been set. Please run the Time");
27 | Serial.println("TimeRTCSet example, or DS1307RTC SetTime example.");
28 | Serial.println();
29 | delay(4000);
30 | }
31 | delay(1000);
32 | }
33 |
34 | void digitalClockDisplay(){
35 | // digital clock display of the time
36 | Serial.print(hour());
37 | printDigits(minute());
38 | printDigits(second());
39 | Serial.print(" ");
40 | Serial.print(day());
41 | Serial.print(" ");
42 | Serial.print(month());
43 | Serial.print(" ");
44 | Serial.print(year());
45 | Serial.println();
46 | }
47 |
48 | void printDigits(int digits){
49 | // utility function for digital clock display: prints preceding colon and leading 0
50 | Serial.print(":");
51 | if(digits < 10)
52 | Serial.print('0');
53 | Serial.print(digits);
54 | }
55 |
56 |
--------------------------------------------------------------------------------
/druhvhtml/compressed/compressed.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Settings
5 |
6 |
7 |
8 |
9 |
10 |
48 |
53 |
54 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | # Continuous Integration (CI) is the practice, in software
2 | # engineering, of merging all developer working copies with a shared mainline
3 | # several times a day < http://docs.platformio.org/en/latest/ci/index.html >
4 | #
5 | # Documentation:
6 | #
7 | # * Travis CI Embedded Builds with PlatformIO
8 | # < https://docs.travis-ci.com/user/integration/platformio/ >
9 | #
10 | # * PlatformIO integration with Travis CI
11 | # < http://docs.platformio.org/en/latest/ci/travis.html >
12 | #
13 | # * User Guide for `platformio ci` command
14 | # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html >
15 | #
16 | #
17 | # Please choice one of the following templates (proposed below) and uncomment
18 | # it (remove "# " before each line) or use own configuration according to the
19 | # Travis CI documentation (see above).
20 | #
21 |
22 |
23 | #
24 | # Template #1: General project. Test it using existing `platformio.ini`.
25 | #
26 |
27 | # language: python
28 | # python:
29 | # - "2.7"
30 | #
31 | # sudo: false
32 | # cache:
33 | # directories:
34 | # - "~/.platformio"
35 | #
36 | # install:
37 | # - pip install -U platformio
38 | #
39 | # script:
40 | # - platformio run
41 |
42 |
43 | #
44 | # Template #2: The project is intended to by used as a library with examples
45 | #
46 |
47 | # language: python
48 | # python:
49 | # - "2.7"
50 | #
51 | # sudo: false
52 | # cache:
53 | # directories:
54 | # - "~/.platformio"
55 | #
56 | # env:
57 | # - PLATFORMIO_CI_SRC=path/to/test/file.c
58 | # - PLATFORMIO_CI_SRC=examples/file.ino
59 | # - PLATFORMIO_CI_SRC=path/to/test/directory
60 | #
61 | # install:
62 | # - pip install -U platformio
63 | #
64 | # script:
65 | # - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N
66 |
--------------------------------------------------------------------------------
/lib/arduinoWebSockets-master/src/libb64/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright-Only Dedication (based on United States law)
2 | or Public Domain Certification
3 |
4 | The person or persons who have associated work with this document (the
5 | "Dedicator" or "Certifier") hereby either (a) certifies that, to the best of
6 | his knowledge, the work of authorship identified is in the public domain of the
7 | country from which the work is published, or (b) hereby dedicates whatever
8 | copyright the dedicators holds in the work of authorship identified below (the
9 | "Work") to the public domain. A certifier, moreover, dedicates any copyright
10 | interest he may have in the associated work, and for these purposes, is
11 | described as a "dedicator" below.
12 |
13 | A certifier has taken reasonable steps to verify the copyright status of this
14 | work. Certifier recognizes that his good faith efforts may not shield him from
15 | liability if in fact the work certified is not in the public domain.
16 |
17 | Dedicator makes this dedication for the benefit of the public at large and to
18 | the detriment of the Dedicator's heirs and successors. Dedicator intends this
19 | dedication to be an overt act of relinquishment in perpetuity of all present
20 | and future rights under copyright law, whether vested or contingent, in the
21 | Work. Dedicator understands that such relinquishment of all rights includes
22 | the relinquishment of all rights to enforce (by lawsuit or otherwise) those
23 | copyrights in the Work.
24 |
25 | Dedicator recognizes that, once placed in the public domain, the Work may be
26 | freely reproduced, distributed, transmitted, used, modified, built upon, or
27 | otherwise exploited by anyone for any purpose, commercial or non-commercial,
28 | and in any way, including by methods that have not yet been invented or
29 | conceived.
--------------------------------------------------------------------------------
/druhvhtml/settings.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Settings
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
53 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/h/timezone.h:
--------------------------------------------------------------------------------
1 | const char timezone_html[] PROGMEM = R"=====(
2 |
3 |
4 | Time Zone
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
Set Timezone
14 |
18 |
19 |
20 |
HOME
21 | Get my GPS
22 |
26 |
27 |
28 |
31 |
32 |
33 |
34 | Return without saving
35 |
36 |
37 |
38 | )=====";
39 |
--------------------------------------------------------------------------------
/h/alarm.h:
--------------------------------------------------------------------------------
1 | const char alarm_html[] PROGMEM = R"=====(
2 |
3 |
4 |
5 |
6 |
7 |
10 |
11 | $externallinks
12 |
25 |
26 |
27 |
53 |
54 |
55 | )=====";
56 |
--------------------------------------------------------------------------------
/lib/Time/examples/TimeTeensy3/TimeTeensy3.ino:
--------------------------------------------------------------------------------
1 | /*
2 | * TimeRTC.pde
3 | * example code illustrating Time library with Real Time Clock.
4 | *
5 | */
6 |
7 | #include
8 |
9 | void setup() {
10 | // set the Time library to use Teensy 3.0's RTC to keep time
11 | setSyncProvider(getTeensy3Time);
12 |
13 | Serial.begin(115200);
14 | while (!Serial); // Wait for Arduino Serial Monitor to open
15 | delay(100);
16 | if (timeStatus()!= timeSet) {
17 | Serial.println("Unable to sync with the RTC");
18 | } else {
19 | Serial.println("RTC has set the system time");
20 | }
21 | }
22 |
23 | void loop() {
24 | if (Serial.available()) {
25 | time_t t = processSyncMessage();
26 | if (t != 0) {
27 | Teensy3Clock.set(t); // set the RTC
28 | setTime(t);
29 | }
30 | }
31 | digitalClockDisplay();
32 | delay(1000);
33 | }
34 |
35 | void digitalClockDisplay() {
36 | // digital clock display of the time
37 | Serial.print(hour());
38 | printDigits(minute());
39 | printDigits(second());
40 | Serial.print(" ");
41 | Serial.print(day());
42 | Serial.print(" ");
43 | Serial.print(month());
44 | Serial.print(" ");
45 | Serial.print(year());
46 | Serial.println();
47 | }
48 |
49 | time_t getTeensy3Time()
50 | {
51 | return Teensy3Clock.get();
52 | }
53 |
54 | /* code to process time sync messages from the serial port */
55 | #define TIME_HEADER "T" // Header tag for serial time sync message
56 |
57 | unsigned long processSyncMessage() {
58 | unsigned long pctime = 0L;
59 | const unsigned long DEFAULT_TIME = 1357041600; // Jan 1 2013
60 |
61 | if(Serial.find(TIME_HEADER)) {
62 | pctime = Serial.parseInt();
63 | return pctime;
64 | if( pctime < DEFAULT_TIME) { // check the value is a valid time (greater than Jan 1 2013)
65 | pctime = 0L; // return 0 to indicate that the time is not valid
66 | }
67 | }
68 | return pctime;
69 | }
70 |
71 | void printDigits(int digits){
72 | // utility function for digital clock display: prints preceding colon and leading 0
73 | Serial.print(":");
74 | if(digits < 10)
75 | Serial.print('0');
76 | Serial.print(digits);
77 | }
78 |
79 |
--------------------------------------------------------------------------------
/html/timezone.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Time Zone
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
Set Timezone
17 |
22 |
23 |
24 |
25 |
HOME
26 | Get my GPS
27 |
31 |
32 |
33 |
34 |
37 |
38 |
39 |
40 |
41 | Return without saving
42 |
43 |
64 |
65 |