Browse Source

Add raspberry pi power control pin

master
Pierrick C 3 years ago
parent
commit
ea15123df4
  1. 6
      circuitpython/code/main.py

6
circuitpython/code/main.py

@ -51,6 +51,7 @@ import time
import gc
import rtc
import board
from digitalio import DigitalInOut, Direction
from busio import UART
# import micropython
import neopixel
@ -75,6 +76,11 @@ NEOPIXEL_MAX_VALUE = 70 # max value instead of brightness to spare some mem
gc.collect()
# micropython.mem_info()
#Set ENable pin for Raspberry power microcontrol
RPI_EN = DigitalInOut(board.D9)
RPI_EN.direction = Direction.OUTPUT
RPI_EN.value = True
# Enable RTC of the feather M0 board
CLOCK = rtc.RTC()

Loading…
Cancel
Save