# mPy - neopixel demonstration on ESP32 pin 25 using array
# Provided by Anthony Vogelaar, Perth Scotland
# rev 0.10  2025-05-20  initial release

from	machine		import	Pin
from	array		import	array
import	neopixel	as		npx

# ================== Neopixel constants ===========================

GREEN   = array('i', [255,   0,   0])		# 'i' is 32 bit int
RED     = array('i', [  0, 255,   0])
BLUE    = array('i', [  0,   0, 255])
YELLOW  = array('i', [255, 255,   0])
MAGENTA = array('i', [  0, 255, 255])
CYAN    = array('i', [255,   0, 255])
WHITE   = array('i', [255, 255, 255])

# =========================== Main ================================

def main():
    leds = npx.NeoPixel(Pin(25), 6)		# Setup for 6 leds on Pin 25
    leds[0] = GREEN
    leds[1] = RED
    leds[2] = BLUE
    leds[3] = YELLOW
    leds[4] = CYAN
    leds[5] = WHITE
    leds.write()
    
    
main()

# ============================ End =================================
