Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Combining several py files
#1
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
Reply


Messages In This Thread
Combining several py files - by ebolisa - Oct-08-2018, 12:36 PM
RE: Combining several py files - by Larz60+ - Oct-08-2018, 02:57 PM
RE: Combining several py files - by ebolisa - Oct-09-2018, 11:43 AM
RE: Combining several py files - by Larz60+ - Oct-09-2018, 06:01 PM
RE: Combining several py files - by nilamo - Oct-09-2018, 06:43 PM
RE: Combining several py files - by ebolisa - Oct-09-2018, 07:16 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Missing graph after combining xls files Kishore01 0 1,356 Apr-15-2020, 10:51 AM
Last Post: Kishore01

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020