Repository navigation
Expand file tree
/
Copy pathsh.py
More file actions
82 lines (70 loc) · 1.98 KB
/
Copy pathsh.py
File metadata and controls
82 lines (70 loc) · 1.98 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
79
80
81
82
def init():
## TODO: change this accordingly to match to a correct spotify account for each OLO
# OLO ID
global OLO_ID
OLO_ID = 1
# Spotify
global spotify_username
spotify_username = "9mgcb91qlhdu2kh4nwj83p165"
global device_oloradio
device_oloradio = '1cb68342235613c14697970cd965e0514b0ec4d6'
global spotify_client_id
spotify_client_id = '86456db5c5364110aa9372794e146bf9'
global spotify_client_secret
spotify_client_secret = 'cd7177a48c3b4ea2a6139b88c1ca87f5'
# LastFM and Database
global dbname
dbname = "yoomy1203"
global lastFM_username
lastFM_username = "yoomy1203"
# For EDS OLO, which is OLO 1
global dbname_eds
dbname_eds = "eds"
global lastFM_username_eds
lastFM_username_eds = ['krispybird', 'tal_amram', 'soccer924', 'yoomy1203', 'bedouinbeat', 'doenjaoogjes']
# lastFM_username_eds = ['yoomy1203', 'soccer924']
# pin configuration
global slider_ch
slider_ch = 7 # channel on MCP3008 the slider is attached to
global touch_ch
touch_ch = 6 # channel on MCP3008 the touch signal is attached to
global switch1
switch1 = 23
global switch2
switch2 = 24
global mEnable
mEnable = 6
global mLeft
mLeft = 13
global mRight
mRight = 12
# Software SPI configuration:
global CLK
CLK = 11
global MISO
MISO = 9
global MOSI
MOSI = 10
global CS
if (OLO_ID == 3):
# OLO Board v2.3 uses pin 8 for CS
CS = 8
else:
CS = 5
# On/Off switch
global onoff
onoff = 17
global values
global timeframe
timeframe = ''
global prevtimeframe
prevtimeframe = ''
# Pretty labels
global labels
labels = ['swi', 'cap', 'sw1', 'sw2']
global spotify_scope
spotify_scope = 'user-modify-playback-state'
global spotify_redirect_uri
spotify_redirect_uri = 'https://example.com/callback/'
global PYLAST_API_KEY
PYLAST_API_KEY = 'e38cc7822bd7476fe4083e36ee69748e'