From 3cdbce39261b05c884b11e5a42545b6bcadd3eec Mon Sep 17 00:00:00 2001
From: ef1g21 <ef1g21@soton.ac.uk>
Date: Mon, 15 May 2023 01:10:57 +0000
Subject: [PATCH] Upload New File

---
 chooseAColourSkeleton.py | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 chooseAColourSkeleton.py

diff --git a/chooseAColourSkeleton.py b/chooseAColourSkeleton.py
new file mode 100644
index 0000000..a867d8f
--- /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
-- 
GitLab