https://github.com/balassy/flowtime-flag
An IoT device powered by an ESP8266 microcontroller that signals flow time with a flag.
https://github.com/balassy/flowtime-flag
arduino-iot arduino-sketch esp8266 esp8266-arduino esp8266-nodemcu iot nodemcu ntp-client servo-motor vscode
Last synced: 2 months ago
JSON representation
An IoT device powered by an ESP8266 microcontroller that signals flow time with a flag.
- Host: GitHub
- URL: https://github.com/balassy/flowtime-flag
- Owner: balassy
- License: mit
- Created: 2019-11-28T22:38:24.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-25T23:14:47.000Z (over 6 years ago)
- Last Synced: 2025-03-05T15:48:37.162Z (over 1 year ago)
- Topics: arduino-iot, arduino-sketch, esp8266, esp8266-arduino, esp8266-nodemcu, iot, nodemcu, ntp-client, servo-motor, vscode
- Language: C++
- Homepage:
- Size: 806 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flow Time Flag
An IoT device powered by an ESP8266 microcontroller that signals [flow time](https://en.wikipedia.org/wiki/Flow_(psychology)) with a flag.
## How it works
This code connects to the specified time server to retrieve the current time adjusted to your current time zone and daylight saving preferences. Based on the specified time range for flow time it rotates a servo motor.
## Getting started
### Hardware
For the electronics all you need is a NodeMCU ESP8266 microcontroller and an SG90 servo motor. The servo needs +5V, so you have to power your board from USB, and then connect the servo to the `Vin` and `GND` pins of the NodeMCU. To control the servo position the code uses the `D7` pin (you can change that in `config.h`).


If you wish to further improve this wiring you can download the [Fritzing Sketch](./doc/wiring/flowtime-flag.fzz) as well.
### Enclosure
You can find the enclosure designed for 3D printing for this project here: https://www.thingiverse.com/thing:4012382


### Software
Load the project into the Arduino IDE (or Visual Studio Code) and import the [WiFiManager library](https://github.com/tzapu/WiFiManager).
Update the parameters in the `config.h` file and upload the sketch to your ESP8266.
### Usage
If you have not connected your ESP8266 to the network before, when first boot up it will create a new WiFi network with the parameters specified in `config.h`. By default the network name is `FlowTimeFlag`.
Connect to this WiFi network with the password specified in `config.h` (by default `FlowTime!`).
Open your favorite web browser and navigate to `http://192.168.4.1`, and configure the WiFi connection. Upon save your device will restart and automatically connect to the specified WiFi network.
## Acknowledgements
Thanks to [Andreas Spiess](https://github.com/SensorsIot) for sharing his [NTP library for ESP8266](https://github.com/SensorsIot/NTPtimeESP), though I had to change his code to make it more reliable.
Thanks to [Roman Minyaylov](https://github.com/roman-minyaylov) for sharing his [NodeMCU Fritzing part](https://github.com/roman-minyaylov/fritzing-parts). I copied the current version of that part into the `./doc/wiring/esp8266-nodemcu-v3` folder.
## About the author
This project is maintained by [György Balássy](https://linkedin.com/in/balassy).