Added dotenv support to fanctl
This commit is contained in:
parent
088f248944
commit
a48fa91e6f
1 changed files with 9 additions and 1 deletions
10
fanctl.py
10
fanctl.py
|
@ -1,10 +1,18 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
import os
|
||||
|
||||
servo = 18
|
||||
|
||||
if true: # set to false to skip using dotenv
|
||||
from dotenv import load_dotenv
|
||||
load_dotenv()
|
||||
servo = int(os.getenv('FANCTL_SERVO_PIN'))
|
||||
|
||||
import RPi.GPIO as IO
|
||||
import time
|
||||
import subprocess
|
||||
|
||||
servo = 18
|
||||
|
||||
IO.setwarnings(False)
|
||||
IO.setmode (IO.BCM)
|
||||
|
|
Loading…
Reference in a new issue