Toggle Navigation
Hatchery
Eggs
reading light
__init__.py
Users
Badges
Login
Register
__init__.py
raw
Content
import buttons, mch22 def on_home_button(pressed): if pressed: mch22.exit_python() buttons.attach(buttons.BTN_HOME, on_home_button) from machine import Pin from neopixel import NeoPixel # Pin 19 controls the power supply to SD card and neopixels powerPin = Pin(19, Pin.OUT) # Pin 5 is the LED's data line dataPin = Pin(5, Pin.OUT) # create a neopixel object for 5 pixels np = NeoPixel(dataPin, 5) for i in range(5): np[i] = (0xFFFFFF, 0xFFFFFF, 0xFFFFFF) np.write() import display display.drawFill(0xFFFFFF) display.flush()