-
Notifications
You must be signed in to change notification settings - Fork 775
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1917 from kattni/lime-update
Lime update
- Loading branch information
Showing
8 changed files
with
56 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
from adafruit_circuitplayground.express import cpx | ||
from adafruit_circuitplayground import cp | ||
|
||
cpx.pixels[0] = ((0, 0, 3)) | ||
while True: | ||
cp.pixels[0] = (0, 0, 3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
from adafruit_circuitplayground.express import cpx | ||
from adafruit_circuitplayground import cp | ||
|
||
cpx.pixels.fill((0, 0, 3)) | ||
while True: | ||
cp.pixels.fill((0, 0, 3)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,43 @@ | ||
from adafruit_circuitplayground.express import cpx | ||
from adafruit_circuitplayground import cp | ||
|
||
while True: | ||
if cpx.switch: | ||
if cp.switch: | ||
print("Slide switch off!") | ||
cpx.pixels.fill((0, 0, 0)) | ||
cpx.stop_tone() | ||
cp.pixels.fill((0, 0, 0)) | ||
cp.stop_tone() | ||
continue | ||
if cpx.touch_A4: | ||
if cp.touch_A4: | ||
print('Touched A4!') | ||
cpx.pixels.fill((15, 0, 0)) | ||
cpx.start_tone(262) | ||
elif cpx.touch_A5: | ||
cp.pixels.fill((15, 0, 0)) | ||
cp.start_tone(262) | ||
elif cp.touch_A5: | ||
print('Touched A5!') | ||
cpx.pixels.fill((15, 5, 0)) | ||
cpx.start_tone(294) | ||
elif cpx.touch_A6: | ||
cp.pixels.fill((15, 5, 0)) | ||
cp.start_tone(294) | ||
elif cp.touch_A6: | ||
print('Touched A6!') | ||
cpx.pixels.fill((15, 15, 0)) | ||
cpx.start_tone(330) | ||
elif cpx.touch_A7: | ||
cp.pixels.fill((15, 15, 0)) | ||
cp.start_tone(330) | ||
elif cp.touch_A7: | ||
print('Touched A7!') | ||
cpx.pixels.fill((0, 15, 0)) | ||
cpx.start_tone(349) | ||
elif cpx.touch_A1: | ||
cp.pixels.fill((0, 15, 0)) | ||
cp.start_tone(349) | ||
elif cp.touch_A1: | ||
print('Touched A1!') | ||
cpx.pixels.fill((0, 15, 15)) | ||
cpx.start_tone(392) | ||
elif cpx.touch_A2 and not cpx.touch_A3: | ||
cp.pixels.fill((0, 15, 15)) | ||
cp.start_tone(392) | ||
elif cp.touch_A2 and not cp.touch_A3: | ||
print('Touched A2!') | ||
cpx.pixels.fill((0, 0, 15)) | ||
cpx.start_tone(440) | ||
elif cpx.touch_A3 and not cpx.touch_A2: | ||
cp.pixels.fill((0, 0, 15)) | ||
cp.start_tone(440) | ||
elif cp.touch_A3 and not cp.touch_A2: | ||
print('Touched A3!') | ||
cpx.pixels.fill((5, 0, 15)) | ||
cpx.start_tone(494) | ||
elif cpx.touch_A2 and cpx.touch_A3: | ||
cp.pixels.fill((5, 0, 15)) | ||
cp.start_tone(494) | ||
elif cp.touch_A2 and cp.touch_A3: | ||
print('Touched "8"!') | ||
cpx.pixels.fill((15, 0, 15)) | ||
cpx.start_tone(523) | ||
cp.pixels.fill((15, 0, 15)) | ||
cp.start_tone(523) | ||
else: | ||
cpx.pixels.fill((0, 0, 0)) | ||
cpx.stop_tone() | ||
cp.pixels.fill((0, 0, 0)) | ||
cp.stop_tone() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
from adafruit_circuitplayground.express import cpx | ||
from adafruit_circuitplayground import cp | ||
|
||
cpx.play_tone(440, 1) | ||
cp.play_tone(440, 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
from adafruit_circuitplayground.express import cpx | ||
from adafruit_circuitplayground import cp | ||
|
||
while True: | ||
if cpx.switch: | ||
if cp.switch: | ||
print("Slide switch off!") | ||
else: | ||
print("Slide switch on!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
from adafruit_circuitplayground.express import cpx | ||
from adafruit_circuitplayground import cp | ||
|
||
while True: | ||
if cpx.touch_A1: | ||
cpx.start_tone(262) | ||
elif cpx.touch_A2: | ||
cpx.start_tone(294) | ||
if cp.touch_A1: | ||
cp.start_tone(262) | ||
elif cp.touch_A2: | ||
cp.start_tone(294) | ||
else: | ||
cpx.stop_tone() | ||
cp.stop_tone() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
from adafruit_circuitplayground.express import cpx | ||
from adafruit_circuitplayground import cp | ||
|
||
while True: | ||
if cpx.touch_A1: | ||
if cp.touch_A1: | ||
print('Touched 1!') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
from adafruit_circuitplayground.express import cpx | ||
from adafruit_circuitplayground import cp | ||
|
||
while True: | ||
if cpx.touch_A1: | ||
if cp.touch_A1: | ||
print('Touched 1!') | ||
elif cpx.touch_A2: | ||
elif cp.touch_A2: | ||
print('Touched 2!') | ||
elif cpx.touch_A3: | ||
elif cp.touch_A3: | ||
print('Touched 3!') | ||
elif cpx.touch_A4: | ||
elif cp.touch_A4: | ||
print('Touched 4!') | ||
elif cpx.touch_A5: | ||
elif cp.touch_A5: | ||
print('Touched 5!') | ||
elif cpx.touch_A6: | ||
elif cp.touch_A6: | ||
print('Touched 6!') | ||
elif cpx.touch_A7: | ||
elif cp.touch_A7: | ||
print('Touched 7!') |