Adafruit_Learning_System_Gu.../MOSFET_Driver_Examples/CircuitPython/code.py
BlitzCityDIY 51a9a0a87b Adding code examples for MOSFET driver
Adding simple blink style examples for MOSFET driver
2022-12-13 15:01:51 -05:00

19 lines
438 B
Python

# SPDX-FileCopyrightText: 2022 Liz Clark for Adafruit Industries
#
# SPDX-License-Identifier: MIT
import time
import board
from digitalio import DigitalInOut, Direction
# motor output
solenoid = DigitalInOut(board.D5)
solenoid.direction = Direction.OUTPUT
while True:
solenoid.value = False
print("The motor is not triggered.")
time.sleep(1)
solenoid.value = True
print("The motor is triggered.")
time.sleep(1)