diff --git a/README.md b/README.md index 1c414f5..72dfdae 100644 --- a/README.md +++ b/README.md @@ -68,16 +68,8 @@ over a dozen parts in total ... that's including a case and USB power supply. -Think of this as an "MVP" (Minimum Viable Product) implementation of -the timer. It works as expected but needs to be turned into a real -"product". The code is completely working but not "done". It's needs -a fair bit of tidying up, factoring, reorganizing, etc. But it -*works* - -HOWEVER ... there are essentially NO docs right now. You have to -figure out stuff from the code or reading this very limited document. -This will hopefully change with time but - for now - you pretty much -need to know how to read Python and do simple wiring. +The code here on the master branch should be considered +stable and usable. ## Basic Hardware Connections @@ -193,15 +185,6 @@ is beyond the range of the timer to correct, you will hear 5 short beeps repeated. - -## What's Next? - -Lots of cleanup, documentation, and stuff will hopefully follow. My -longer term goal is to release a preconfigured minimal Linux image -you can just blow down onto a microSD card and all this stuff will -just "work". - - ## Help & Support There isn't any. You can send mail to `devtimer@tundraware.com` and I'll diff --git a/devtimer.py b/devtimer.py index 90ee5e2..6397de6 100755 --- a/devtimer.py +++ b/devtimer.py @@ -365,19 +365,19 @@ ##### ''' - We start a perpetual thread to read the current temperature - and adjust time accordingly + Prime the hardware and setup perpetual threads to monitor + switches, read temperature, and display virtual time. - Notice that the actual updating of the display gets run on its own - thread as well. That's because - on a Pi Zero, at least - it takes - over 250ms to do this. We don't want that time added to our timing - loop, so we send it off on a parallel thread, and initiate timing - for the next round in this thread. + Notice that the actual updating of the displays gets run on their own + threads. That's because - on a Pi Zero, at least - it takes + over 250ms for a display update. We don't want that time added to our timing + loop. So, we run timing, monitoring, and display updates all as separately + threaded activities. ''' if __name__ == "__main__": - # Setup the hardware + # Setup the hardware connected to GPIO wiringpi.wiringPiSetupGpio() wiringpi.pinMode(BEEPER, wiringpi.GPIO.OUTPUT) @@ -387,6 +387,8 @@ wiringpi.pinMode(PROFILE_SW_FILM, wiringpi.GPIO.PUD_UP) wiringpi.pinMode(PROFILE_SW_PAPER, wiringpi.GPIO.PUD_UP) + # Initialize objects to control timing and temp LEDs + monitor_profile_sw.DIM_BY=0 # How much are we currently dimming show_time.LED = TM1637(TIME_CLK, TIME_DIO, DEFAULT_BRIGHTNESS - monitor_profile_sw.DIM_BY) show_temp.LED = TM1637(TEMP_CLK, TEMP_DIO, DEFAULT_BRIGHTNESS - monitor_profile_sw.DIM_BY)