Example: 50-OpenMV-Boards/53-N6-Boards/50-Board-Control/status_pin.py
# 本作品采用MIT许可证授权。
# Copyright (c) 2013-2026 OpenMV LLC. All rights reserved.
# https://github.com/openmv/openmv/blob/master/LICENSE
#
# Status Pin
#
# The status pin is an internal Pin on your OpenMV Cam driven by the
# battery management IC. It indicates whether the system is running
# from VIN/USB. The green light reflects the pin state.
import machine
st = machine.Pin("ST", machine.Pin.IN)
g = machine.LED("LED_GREEN")
while True:
g.value(st.value())