Skip to content

Commit c32ccda

Browse files
authored
Merge pull request #1917 from kattni/lime-update
Lime update
2 parents dcd5ce3 + f59de93 commit c32ccda

File tree

8 files changed

+56
-54
lines changed

8 files changed

+56
-54
lines changed
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
from adafruit_circuitplayground.express import cpx
1+
from adafruit_circuitplayground import cp
22

3-
cpx.pixels[0] = ((0, 0, 3))
3+
while True:
4+
cp.pixels[0] = (0, 0, 3)
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
from adafruit_circuitplayground.express import cpx
1+
from adafruit_circuitplayground import cp
22

3-
cpx.pixels.fill((0, 0, 3))
3+
while True:
4+
cp.pixels.fill((0, 0, 3))
Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
1-
from adafruit_circuitplayground.express import cpx
1+
from adafruit_circuitplayground import cp
22

33
while True:
4-
if cpx.switch:
4+
if cp.switch:
55
print("Slide switch off!")
6-
cpx.pixels.fill((0, 0, 0))
7-
cpx.stop_tone()
6+
cp.pixels.fill((0, 0, 0))
7+
cp.stop_tone()
88
continue
9-
if cpx.touch_A4:
9+
if cp.touch_A4:
1010
print('Touched A4!')
11-
cpx.pixels.fill((15, 0, 0))
12-
cpx.start_tone(262)
13-
elif cpx.touch_A5:
11+
cp.pixels.fill((15, 0, 0))
12+
cp.start_tone(262)
13+
elif cp.touch_A5:
1414
print('Touched A5!')
15-
cpx.pixels.fill((15, 5, 0))
16-
cpx.start_tone(294)
17-
elif cpx.touch_A6:
15+
cp.pixels.fill((15, 5, 0))
16+
cp.start_tone(294)
17+
elif cp.touch_A6:
1818
print('Touched A6!')
19-
cpx.pixels.fill((15, 15, 0))
20-
cpx.start_tone(330)
21-
elif cpx.touch_A7:
19+
cp.pixels.fill((15, 15, 0))
20+
cp.start_tone(330)
21+
elif cp.touch_A7:
2222
print('Touched A7!')
23-
cpx.pixels.fill((0, 15, 0))
24-
cpx.start_tone(349)
25-
elif cpx.touch_A1:
23+
cp.pixels.fill((0, 15, 0))
24+
cp.start_tone(349)
25+
elif cp.touch_A1:
2626
print('Touched A1!')
27-
cpx.pixels.fill((0, 15, 15))
28-
cpx.start_tone(392)
29-
elif cpx.touch_A2 and not cpx.touch_A3:
27+
cp.pixels.fill((0, 15, 15))
28+
cp.start_tone(392)
29+
elif cp.touch_A2 and not cp.touch_A3:
3030
print('Touched A2!')
31-
cpx.pixels.fill((0, 0, 15))
32-
cpx.start_tone(440)
33-
elif cpx.touch_A3 and not cpx.touch_A2:
31+
cp.pixels.fill((0, 0, 15))
32+
cp.start_tone(440)
33+
elif cp.touch_A3 and not cp.touch_A2:
3434
print('Touched A3!')
35-
cpx.pixels.fill((5, 0, 15))
36-
cpx.start_tone(494)
37-
elif cpx.touch_A2 and cpx.touch_A3:
35+
cp.pixels.fill((5, 0, 15))
36+
cp.start_tone(494)
37+
elif cp.touch_A2 and cp.touch_A3:
3838
print('Touched "8"!')
39-
cpx.pixels.fill((15, 0, 15))
40-
cpx.start_tone(523)
39+
cp.pixels.fill((15, 0, 15))
40+
cp.start_tone(523)
4141
else:
42-
cpx.pixels.fill((0, 0, 0))
43-
cpx.stop_tone()
42+
cp.pixels.fill((0, 0, 0))
43+
cp.stop_tone()
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
from adafruit_circuitplayground.express import cpx
1+
from adafruit_circuitplayground import cp
22

3-
cpx.play_tone(440, 1)
3+
cp.play_tone(440, 1)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
from adafruit_circuitplayground.express import cpx
1+
from adafruit_circuitplayground import cp
22

33
while True:
4-
if cpx.switch:
4+
if cp.switch:
55
print("Slide switch off!")
66
else:
77
print("Slide switch on!")
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from adafruit_circuitplayground.express import cpx
1+
from adafruit_circuitplayground import cp
22

33
while True:
4-
if cpx.touch_A1:
5-
cpx.start_tone(262)
6-
elif cpx.touch_A2:
7-
cpx.start_tone(294)
4+
if cp.touch_A1:
5+
cp.start_tone(262)
6+
elif cp.touch_A2:
7+
cp.start_tone(294)
88
else:
9-
cpx.stop_tone()
9+
cp.stop_tone()
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from adafruit_circuitplayground.express import cpx
1+
from adafruit_circuitplayground import cp
22

33
while True:
4-
if cpx.touch_A1:
4+
if cp.touch_A1:
55
print('Touched 1!')
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
from adafruit_circuitplayground.express import cpx
1+
from adafruit_circuitplayground import cp
22

33
while True:
4-
if cpx.touch_A1:
4+
if cp.touch_A1:
55
print('Touched 1!')
6-
elif cpx.touch_A2:
6+
elif cp.touch_A2:
77
print('Touched 2!')
8-
elif cpx.touch_A3:
8+
elif cp.touch_A3:
99
print('Touched 3!')
10-
elif cpx.touch_A4:
10+
elif cp.touch_A4:
1111
print('Touched 4!')
12-
elif cpx.touch_A5:
12+
elif cp.touch_A5:
1313
print('Touched 5!')
14-
elif cpx.touch_A6:
14+
elif cp.touch_A6:
1515
print('Touched 6!')
16-
elif cpx.touch_A7:
16+
elif cp.touch_A7:
1717
print('Touched 7!')

0 commit comments

Comments
 (0)