|
| 1 | +# lighting-arduino |
| 2 | + |
| 3 | +## Background |
| 4 | + |
| 5 | +People have various preferences when it comes to their physical work |
| 6 | +environment, and it's common for these preferences to conflict. Unfortunately, |
| 7 | +in the matter of lighting, it's common for this conflict to manifest in the |
| 8 | +form of a war over the dimmer-switch, leading to fluctuations in lighting |
| 9 | +throughout the day -- which tends to give me a headache. |
| 10 | + |
| 11 | +`lighting-arduino` seeks to use the [`SparkFun ESP32 Thing |
| 12 | +Plus`][sparkfun-thing-plus] and the [`SparkFun Ambient Light |
| 13 | +Sensor`][sparkfun-light-sensor] to measure and track workspace illuminance over |
| 14 | +time. |
| 15 | + |
| 16 | +OSHA [specifies a minimum illuminance of 30 foot-candles][osha-general-office] |
| 17 | +in general office settings, with a [recommendation of 20-50 |
| 18 | +foot-candles][osha-monitors] when working with CRT monitors, and up to 73 |
| 19 | +foot-candles when working with LED monitors (no minimum is set forth in this |
| 20 | +case). |
| 21 | + |
| 22 | +[sparkfun-thing-plus]:https://www.sparkfun.com/products/14689 |
| 23 | +[sparkfun-light-sensor]:https://www.sparkfun.com/products/15436 |
| 24 | +[osha-general-office]:https://www.osha.gov/laws-regs/regulations/standardnumber/1926/1926.56 |
| 25 | +[osha-monitors]:https://www.osha.gov/SLTC/etools/computerworkstations/wkstation_enviro.html |
| 26 | + |
| 27 | +## Reading |
| 28 | + |
| 29 | +- [SparkFun Thing Plus][sparkfun-thing-plus] |
| 30 | +- [Serial comm on Linux][linux-serial-comm] |
| 31 | + |
| 32 | +[linux-serial-comm]:https://www.cyberciti.biz/hardware/5-linux-unix-commands-for-connecting-to-the-serial-console/ |
| 33 | +[sparkfun-thing-plus]:https://learn.sparkfun.com/tutorials/esp32-thing-plus-hookup-guide |
| 34 | + |
| 35 | +## The plan |
| 36 | + |
| 37 | +- [ ] Serial output of the current illuminance, with support for configurable |
| 38 | + linear backoff polling to conserve energy |
| 39 | +- [ ] Configuration for "acceptable min/max illuminance" and "LED behavior", |
| 40 | + s.t. the on-board LED either turns on, turns off, or blinks when the light |
| 41 | + level is acceptable (or unacceptable) |
| 42 | +- [ ] BLE server w/ real-time output |
| 43 | +- [ ] Storage of metrics (one datapoint at variable rates based on recency -- |
| 44 | + every sec for the last min, and every 15min after that) long-term trends |
| 45 | +- [ ] (Stretch goal) a way to output a graph from the metrics |
0 commit comments