diff --git a/Piano_In_The_Key_Of_Lime/NeoPixel0/code.py b/Piano_In_The_Key_Of_Lime/NeoPixel0/code.py index 5aebd672a..b160d926e 100755 --- a/Piano_In_The_Key_Of_Lime/NeoPixel0/code.py +++ b/Piano_In_The_Key_Of_Lime/NeoPixel0/code.py @@ -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) diff --git a/Piano_In_The_Key_Of_Lime/NeoPixelAll/code.py b/Piano_In_The_Key_Of_Lime/NeoPixelAll/code.py index 499947a66..29e34b5f7 100755 --- a/Piano_In_The_Key_Of_Lime/NeoPixelAll/code.py +++ b/Piano_In_The_Key_Of_Lime/NeoPixelAll/code.py @@ -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)) diff --git a/Piano_In_The_Key_Of_Lime/PianoInTheKeyOfLime/code.py b/Piano_In_The_Key_Of_Lime/PianoInTheKeyOfLime/code.py index dde406330..d9b27053e 100755 --- a/Piano_In_The_Key_Of_Lime/PianoInTheKeyOfLime/code.py +++ b/Piano_In_The_Key_Of_Lime/PianoInTheKeyOfLime/code.py @@ -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() diff --git a/Piano_In_The_Key_Of_Lime/SingleTone/code.py b/Piano_In_The_Key_Of_Lime/SingleTone/code.py index aee23f9c8..2f8a710ef 100755 --- a/Piano_In_The_Key_Of_Lime/SingleTone/code.py +++ b/Piano_In_The_Key_Of_Lime/SingleTone/code.py @@ -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) diff --git a/Piano_In_The_Key_Of_Lime/SlideSwitch/code.py b/Piano_In_The_Key_Of_Lime/SlideSwitch/code.py index a7886d46e..6eb5c2ef1 100755 --- a/Piano_In_The_Key_Of_Lime/SlideSwitch/code.py +++ b/Piano_In_The_Key_Of_Lime/SlideSwitch/code.py @@ -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!") diff --git a/Piano_In_The_Key_Of_Lime/StartStopTone/code.py b/Piano_In_The_Key_Of_Lime/StartStopTone/code.py index b50a895f6..9eeb13ff9 100755 --- a/Piano_In_The_Key_Of_Lime/StartStopTone/code.py +++ b/Piano_In_The_Key_Of_Lime/StartStopTone/code.py @@ -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() diff --git a/Piano_In_The_Key_Of_Lime/TouchA1/code.py b/Piano_In_The_Key_Of_Lime/TouchA1/code.py index c641d182f..3aa30458c 100755 --- a/Piano_In_The_Key_Of_Lime/TouchA1/code.py +++ b/Piano_In_The_Key_Of_Lime/TouchA1/code.py @@ -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!') diff --git a/Piano_In_The_Key_Of_Lime/TouchAll/code.py b/Piano_In_The_Key_Of_Lime/TouchAll/code.py index 9f495690e..c6f8e7fdf 100755 --- a/Piano_In_The_Key_Of_Lime/TouchAll/code.py +++ b/Piano_In_The_Key_Of_Lime/TouchAll/code.py @@ -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!')