We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 968bd46 + b4b80a8 commit f8409efCopy full SHA for f8409ef
1 file changed
MicroPython_NeoPixel_Blink/main.py
@@ -0,0 +1,19 @@
1
+# SPDX-FileCopyrightText: 2022 Kattni Rembor for Adafruit Industries
2
+# SPDX-License-Identifier: MIT
3
+import time
4
+from machine import Pin
5
+from neopixel import NeoPixel
6
+
7
+power_pin = Pin(8, Pin.OUT) # NeoPixel power is on pin 8
8
+power_pin.on() # Enable the NeoPixel Power
9
10
+pin = Pin(5, Pin.OUT) # Onboard NeoPixel is on pin 5
11
+np = NeoPixel(pin, 1) # create NeoPixel driver on pin 5 for 1 pixel
12
13
+while True:
14
+ np.fill((0, 0, 150)) # Set the NeoPixel blue
15
+ np.write() # Write data to the NeoPixel
16
+ time.sleep(0.5) # Pause for 0.5 seconds
17
+ np.fill((0, 0, 0)) # Turn the NeoPixel off
18
19
0 commit comments