diff --git a/chooseAColourSkeleton.py b/chooseAColourSkeleton.py new file mode 100644 index 0000000000000000000000000000000000000000..a867d8f797060fb5f85760ee8913d917fb90fd2c --- /dev/null +++ b/chooseAColourSkeleton.py @@ -0,0 +1,37 @@ + +from neopixel import Neopixel +import utime + +led = Neopixel(1, 0, 28, "RGB") # 1 LED, state machine 0, GP28 pin, RGB colour mode + +blue = (195, 0, 90) +#TODO: Add some predefined colours + + + +while True: + print( "To switch off the LED enter 'off'") + print("Predefined colours are blue,red,green,yellow and pink") + user = input("Enter the colour if you want from predefined colours:" ) + + #TODO: Sanitise user input to remove spaces + + + if user == "blue": + #TODO: Switch on the LED to that particular colour + + #TODO: Do the same for all the rest of your colours + + elif user =="off": + led.set_pixel(0, (0,0,0)) + led.show() + + + + + + + + + + \ No newline at end of file