-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfiguration.py
50 lines (33 loc) · 936 Bytes
/
configuration.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
__author__ = 'Jens'
# DATABASE config
DB_HOST = "localhost"
DB_NAME = "pullups"
DB_USER = "pullup"
DB_PASS = "pulluppass456"
# SYSTEM config
# turn on or off debugging mode (logging in console)
DEBUG = 0
# after how many seconds the sensor should go to standby mode (turning off display)
SHUTDOWN_DELAY = 60
# the max distance from the sensor to the head of the athlete where a pullup should be counted (cm)
COUNT_DISTANCE = 5
# the min distance the athlete's head has to move away from the sensor to reset the cheat counter (cm)
RESET_DISTANCE = 20
# the milliseconds an athlete's head has to stay away from the sensor (more then RESET_DISTANCE away)
# to reset the cheat counter
RESET_TIME = 1000
# PULLUPs config
PULLUPS_PER_DAY = 50
# PIN config (GPIO pin numbering)
LED_PIN = 18
SONIC_TRIG = 23
SONIC_ECHO = 24
MOTION = 14
BUZZER = 15
LCD_RS = 25
LCD_E = 8
LCD_D4 = 7
LCD_D5 = 1
LCD_D6 = 12
LCD_D7 = 16
LCD_K = 20