Oct-08-2018, 12:36 PM
Hi,
I’m building an alarm clock based on the Raspberry Zero board, a LED display (https://learn.adafruit.com/adafruit-led-...t-backpack) and a vibration motion (as a switch) - no buttons used.
The local time comes from the board’s OS and the alarm time is set via a local web page. The latter stores 4 variables in a text file: hour, minutes, alarm ON/OFF and if activated on weekends (YES/NO).
My mainfile.py starts at power up and trough a ‘While(True)’ loop displays the actual time.
I’m new to Python so I’m looking for some directions and not necessary a code.
Having said that, my question is how do I interface with the mainfile.py the following files?
beep.py – generates a beep in a loop for two minutes unless the vibration sensor is activated.
alarm.py – reads the text file and compares the actual time with the one set from the web page if there’s a match, then runs beep.py.
I imagine that all the files need to go in the While loop or do they go through a different thread?
TIA
I’m building an alarm clock based on the Raspberry Zero board, a LED display (https://learn.adafruit.com/adafruit-led-...t-backpack) and a vibration motion (as a switch) - no buttons used.
The local time comes from the board’s OS and the alarm time is set via a local web page. The latter stores 4 variables in a text file: hour, minutes, alarm ON/OFF and if activated on weekends (YES/NO).
My mainfile.py starts at power up and trough a ‘While(True)’ loop displays the actual time.
I’m new to Python so I’m looking for some directions and not necessary a code.
Having said that, my question is how do I interface with the mainfile.py the following files?
beep.py – generates a beep in a loop for two minutes unless the vibration sensor is activated.
alarm.py – reads the text file and compares the actual time with the one set from the web page if there’s a match, then runs beep.py.
I imagine that all the files need to go in the While loop or do they go through a different thread?
TIA