-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathraspi-gpio-lightswitch.conf
More file actions
78 lines (76 loc) · 3.37 KB
/
raspi-gpio-lightswitch.conf
File metadata and controls
78 lines (76 loc) · 3.37 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
########################################################
# configuration file for #
# raspi-gpio-lightswitch #
########################################################
[GPIO]
#
# General: use pin numbering in BCM format
#
#
# Configure the GPIO input pin connected to a button
# --------------------------------------------------
#
# Button = input_pin_number,up|dn|upex|dnex,press|release|press_release|release_press[,bouncetime_ms]
#
# input_pin_number number of pin to which a button is connected
#
# up|dn|upex|dnex pull resistor configuration
# up - use internal pull-up resistor
# dn - use internal pull-down resistor
# upex, dnex - indicate external pull resistors used
#
# press|release|press_release|release_press
# button event to act on
# press - toggle light whenever button is pressed
# release - toggle light whenever button is released
# press_release - switch light on when button is pressed,
# and switch off when button is released after being pressed again
# release_press - switch light on when button is pressed and then released,
# and switch off when button is pressed again
#
# bouncetime_ms time span in milliseconds during which subsequent events will be ignored
#
Button = 25,upex,press,100
#
# Configure the GPIO ouput pin connected to a LED, MOSFET or other driver
# -----------------------------------------------------------------------
#
# Light = output_pin_number[,brightness_exp]
#
# output_pin_number number of pin to which a LED is connected
#
# pins 12, 13, 18, 19 allow for hardware PWM;
# availability may depend on other hardware installed (e.g. on-board audio) and the pin factory used;
# set config.txt accordingly and make sure there are no conflicts with other hardware
#
# brightness_exp float number used for brightness linearisation (when dimming); default is 1
# useful values depend on type of LED, typically something in the range of
# 2...3 should fit
#
#Light = 12
Light = 12,2
#
# Configure hardware-PWM for dimming the light
# --------------------------------------------
#
# Dim = dim_mode[,dim_level_num,up|dn[,long_press_sec]]
#
# dim_mode Definition of dim function
# 0 - no dimming, just on/off (default, if no Dim entry specified)
# 1 - dim up/dn + off per button event
# 2 - start dim up/dn on long press, with one dim-step after defined time;
# switch on/off on button release after short press;
# remember last dim level by state file
#
# dim_level_num number of dim-levels, 'off' not included; default is 3
# minimum intensity and step size = 100% / dim_level_num
# e.g. dim_level_num=4 results in 100% / 4 = 25% step size
#
# up|dn cycle through dim-levels with increasing (up) or decreasing (dn) intensity;
# default is 'up'
#
# long_press_sec number of seconds to hold button until dimming is started; default is 2 seconds
#
#Dim = 0
#Dim = 1,4,up
Dim = 2,4,up,1.5