diff --git a/.gitignore b/.gitignore index cb4ead0..b4f5b02 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .*.swp *.o +.pio diff --git a/README.md b/README.md new file mode 100644 index 0000000..f0b451c --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +# WordClock +## Hardware +Take a look inside the [hardware](hardware/) directory. + +## Software +you have two options to build this software: +1. Using Arduino IDE +2. Using platformio + +## Arduino IDE + +### Adding ESP8266 Board +If you want to use ESP8266 hardware you first need to do add it to Arduino. +* Install the current upstream Arduino IDE at the 1.8.7 level or later. The current version is on the [Arduino website](https://www.arduino.cc/en/main/software). +* Start Arduino and open the Preferences window. +* Enter ```https://arduino.esp8266.com/stable/package_esp8266com_index.json``` into the *Additional Board Manager URLs* field. You can add multiple URLs, separating them with commas. +* Open Boards Manager from Tools > Board menu and install *esp8266* platform (and don't forget to select your ESP8266 board from Tools > Board menu after installation). + +### Installing the required libraries +Please refer to the [platformio configuration](platformio.ini) for a list of required libraries. + +## platformio +* [Install platformio](https://docs.platformio.org/en/latest/installation.html) +* To build this project for your target, such as D1 Mini run: + +``` +pio run -e d1_mini +``` + +* To upload the firmware to your Word Clock, run: + +``` +pio run -e d1_mini -t upload +``` diff --git a/WordClock.svg b/hardware/WordClock.svg similarity index 100% rename from WordClock.svg rename to hardware/WordClock.svg diff --git a/platformio.ini b/platformio.ini new file mode 100644 index 0000000..dc5740a --- /dev/null +++ b/platformio.ini @@ -0,0 +1,15 @@ +[platformio] +src_dir = wordClock + +[env:d1_mini] +platform = espressif8266 +board = d1_mini +framework = arduino +upload_speed = 115200 + +lib_deps = + Adafruit NeoPixel@1.3.2 + Time@1.5 + Timezone@1.2.2 + PubSubClient@2.7 + diff --git a/DisplayDriver10x11Clock.cpp b/wordClock/DisplayDriver10x11Clock.cpp similarity index 100% rename from DisplayDriver10x11Clock.cpp rename to wordClock/DisplayDriver10x11Clock.cpp diff --git a/DisplayDriver10x11Clock.h b/wordClock/DisplayDriver10x11Clock.h similarity index 100% rename from DisplayDriver10x11Clock.h rename to wordClock/DisplayDriver10x11Clock.h diff --git a/DisplayDriverFablabNeaClock.cpp b/wordClock/DisplayDriverFablabNeaClock.cpp similarity index 100% rename from DisplayDriverFablabNeaClock.cpp rename to wordClock/DisplayDriverFablabNeaClock.cpp diff --git a/DisplayDriverFablabNeaClock.h b/wordClock/DisplayDriverFablabNeaClock.h similarity index 100% rename from DisplayDriverFablabNeaClock.h rename to wordClock/DisplayDriverFablabNeaClock.h diff --git a/DisplayDriverFrickelClock.cpp b/wordClock/DisplayDriverFrickelClock.cpp similarity index 100% rename from DisplayDriverFrickelClock.cpp rename to wordClock/DisplayDriverFrickelClock.cpp diff --git a/DisplayDriverFrickelClock.h b/wordClock/DisplayDriverFrickelClock.h similarity index 100% rename from DisplayDriverFrickelClock.h rename to wordClock/DisplayDriverFrickelClock.h diff --git a/DiyHueController.cpp b/wordClock/DiyHueController.cpp similarity index 100% rename from DiyHueController.cpp rename to wordClock/DiyHueController.cpp diff --git a/DiyHueController.h b/wordClock/DiyHueController.h similarity index 100% rename from DiyHueController.h rename to wordClock/DiyHueController.h diff --git a/FallingStarAnimator.cpp b/wordClock/FallingStarAnimator.cpp similarity index 100% rename from FallingStarAnimator.cpp rename to wordClock/FallingStarAnimator.cpp diff --git a/FallingStarAnimator.h b/wordClock/FallingStarAnimator.h similarity index 100% rename from FallingStarAnimator.h rename to wordClock/FallingStarAnimator.h diff --git a/HttpContent.h b/wordClock/HttpContent.h similarity index 100% rename from HttpContent.h rename to wordClock/HttpContent.h diff --git a/HttpController.cpp b/wordClock/HttpController.cpp similarity index 100% rename from HttpController.cpp rename to wordClock/HttpController.cpp diff --git a/HttpController.h b/wordClock/HttpController.h similarity index 100% rename from HttpController.h rename to wordClock/HttpController.h diff --git a/IAnimator.h b/wordClock/IAnimator.h similarity index 100% rename from IAnimator.h rename to wordClock/IAnimator.h diff --git a/IColorControllable.h b/wordClock/IColorControllable.h similarity index 100% rename from IColorControllable.h rename to wordClock/IColorControllable.h diff --git a/IDisplayDriver.h b/wordClock/IDisplayDriver.h similarity index 100% rename from IDisplayDriver.h rename to wordClock/IDisplayDriver.h diff --git a/IWordFactoryFrankenClock.h b/wordClock/IWordFactoryFrankenClock.h similarity index 100% rename from IWordFactoryFrankenClock.h rename to wordClock/IWordFactoryFrankenClock.h diff --git a/IWordingStrategy.h b/wordClock/IWordingStrategy.h similarity index 100% rename from IWordingStrategy.h rename to wordClock/IWordingStrategy.h diff --git a/IncrementalAnimator.cpp b/wordClock/IncrementalAnimator.cpp similarity index 100% rename from IncrementalAnimator.cpp rename to wordClock/IncrementalAnimator.cpp diff --git a/IncrementalAnimator.h b/wordClock/IncrementalAnimator.h similarity index 100% rename from IncrementalAnimator.h rename to wordClock/IncrementalAnimator.h diff --git a/MockWordClockScene.cpp b/wordClock/MockWordClockScene.cpp similarity index 100% rename from MockWordClockScene.cpp rename to wordClock/MockWordClockScene.cpp diff --git a/MockWordClockScene.h b/wordClock/MockWordClockScene.h similarity index 100% rename from MockWordClockScene.h rename to wordClock/MockWordClockScene.h diff --git a/MqttController.cpp b/wordClock/MqttController.cpp similarity index 100% rename from MqttController.cpp rename to wordClock/MqttController.cpp diff --git a/MqttController.h b/wordClock/MqttController.h similarity index 100% rename from MqttController.h rename to wordClock/MqttController.h diff --git a/NtpClient.cpp b/wordClock/NtpClient.cpp similarity index 100% rename from NtpClient.cpp rename to wordClock/NtpClient.cpp diff --git a/NtpClient.h b/wordClock/NtpClient.h similarity index 100% rename from NtpClient.h rename to wordClock/NtpClient.h diff --git a/NullAnimator.cpp b/wordClock/NullAnimator.cpp similarity index 100% rename from NullAnimator.cpp rename to wordClock/NullAnimator.cpp diff --git a/NullAnimator.h b/wordClock/NullAnimator.h similarity index 100% rename from NullAnimator.h rename to wordClock/NullAnimator.h diff --git a/PersistentColors.cpp b/wordClock/PersistentColors.cpp similarity index 100% rename from PersistentColors.cpp rename to wordClock/PersistentColors.cpp diff --git a/PersistentColors.h b/wordClock/PersistentColors.h similarity index 100% rename from PersistentColors.h rename to wordClock/PersistentColors.h diff --git a/PersistentStorage.cpp b/wordClock/PersistentStorage.cpp similarity index 100% rename from PersistentStorage.cpp rename to wordClock/PersistentStorage.cpp diff --git a/PersistentStorage.h b/wordClock/PersistentStorage.h similarity index 100% rename from PersistentStorage.h rename to wordClock/PersistentStorage.h diff --git a/Word.cpp b/wordClock/Word.cpp similarity index 100% rename from Word.cpp rename to wordClock/Word.cpp diff --git a/Word.h b/wordClock/Word.h similarity index 100% rename from Word.h rename to wordClock/Word.h diff --git a/WordClockScene.cpp b/wordClock/WordClockScene.cpp similarity index 100% rename from WordClockScene.cpp rename to wordClock/WordClockScene.cpp diff --git a/WordClockScene.h b/wordClock/WordClockScene.h similarity index 100% rename from WordClockScene.h rename to wordClock/WordClockScene.h diff --git a/WordFactoryEnglish10x11Clock.cpp b/wordClock/WordFactoryEnglish10x11Clock.cpp similarity index 100% rename from WordFactoryEnglish10x11Clock.cpp rename to wordClock/WordFactoryEnglish10x11Clock.cpp diff --git a/WordFactoryEnglish10x11Clock.h b/wordClock/WordFactoryEnglish10x11Clock.h similarity index 100% rename from WordFactoryEnglish10x11Clock.h rename to wordClock/WordFactoryEnglish10x11Clock.h diff --git a/WordFactoryFrankenClock.cpp b/wordClock/WordFactoryFrankenClock.cpp similarity index 100% rename from WordFactoryFrankenClock.cpp rename to wordClock/WordFactoryFrankenClock.cpp diff --git a/WordFactoryFrankenClock.h b/wordClock/WordFactoryFrankenClock.h similarity index 100% rename from WordFactoryFrankenClock.h rename to wordClock/WordFactoryFrankenClock.h diff --git a/WordFactoryFrickelClock.cpp b/wordClock/WordFactoryFrickelClock.cpp similarity index 100% rename from WordFactoryFrickelClock.cpp rename to wordClock/WordFactoryFrickelClock.cpp diff --git a/WordFactoryFrickelClock.h b/wordClock/WordFactoryFrickelClock.h similarity index 100% rename from WordFactoryFrickelClock.h rename to wordClock/WordFactoryFrickelClock.h diff --git a/WordFactoryGermanV2Clock.cpp b/wordClock/WordFactoryGermanV2Clock.cpp similarity index 100% rename from WordFactoryGermanV2Clock.cpp rename to wordClock/WordFactoryGermanV2Clock.cpp diff --git a/WordFactoryGermanV2Clock.h b/wordClock/WordFactoryGermanV2Clock.h similarity index 100% rename from WordFactoryGermanV2Clock.h rename to wordClock/WordFactoryGermanV2Clock.h diff --git a/WordFactorySchwabenClock.cpp b/wordClock/WordFactorySchwabenClock.cpp similarity index 100% rename from WordFactorySchwabenClock.cpp rename to wordClock/WordFactorySchwabenClock.cpp diff --git a/WordFactorySchwabenClock.h b/wordClock/WordFactorySchwabenClock.h similarity index 100% rename from WordFactorySchwabenClock.h rename to wordClock/WordFactorySchwabenClock.h diff --git a/WordList.cpp b/wordClock/WordList.cpp similarity index 100% rename from WordList.cpp rename to wordClock/WordList.cpp diff --git a/WordList.h b/wordClock/WordList.h similarity index 100% rename from WordList.h rename to wordClock/WordList.h diff --git a/WordingStrategyEnglish.cpp b/wordClock/WordingStrategyEnglish.cpp similarity index 100% rename from WordingStrategyEnglish.cpp rename to wordClock/WordingStrategyEnglish.cpp diff --git a/WordingStrategyEnglish.h b/wordClock/WordingStrategyEnglish.h similarity index 100% rename from WordingStrategyEnglish.h rename to wordClock/WordingStrategyEnglish.h diff --git a/WordingStrategyFranken.cpp b/wordClock/WordingStrategyFranken.cpp similarity index 100% rename from WordingStrategyFranken.cpp rename to wordClock/WordingStrategyFranken.cpp diff --git a/WordingStrategyFranken.h b/wordClock/WordingStrategyFranken.h similarity index 100% rename from WordingStrategyFranken.h rename to wordClock/WordingStrategyFranken.h diff --git a/WordingStrategySchwaben.cpp b/wordClock/WordingStrategySchwaben.cpp similarity index 100% rename from WordingStrategySchwaben.cpp rename to wordClock/WordingStrategySchwaben.cpp diff --git a/WordingStrategySchwaben.h b/wordClock/WordingStrategySchwaben.h similarity index 100% rename from WordingStrategySchwaben.h rename to wordClock/WordingStrategySchwaben.h diff --git a/WordingStrategyStesie.cpp b/wordClock/WordingStrategyStesie.cpp similarity index 100% rename from WordingStrategyStesie.cpp rename to wordClock/WordingStrategyStesie.cpp diff --git a/WordingStrategyStesie.h b/wordClock/WordingStrategyStesie.h similarity index 100% rename from WordingStrategyStesie.h rename to wordClock/WordingStrategyStesie.h diff --git a/WordingStrategyWest.cpp b/wordClock/WordingStrategyWest.cpp similarity index 100% rename from WordingStrategyWest.cpp rename to wordClock/WordingStrategyWest.cpp diff --git a/WordingStrategyWest.h b/wordClock/WordingStrategyWest.h similarity index 100% rename from WordingStrategyWest.h rename to wordClock/WordingStrategyWest.h diff --git a/wordClock.ino b/wordClock/wordClock.ino similarity index 100% rename from wordClock.ino rename to wordClock/wordClock.ino