This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries | |
# SPDX-License-Identifier: MIT | |
# Use this example for digital pin control of an H-bridge driver | |
# like a DRV8833, TB6612 or L298N. | |
import time | |
import board | |
import digitalio | |
from adafruit_motor import stepper |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import RPi.GPIO as gpio | |
import time | |
gpio.setmode(gpio.BCM) | |
gpio.setwarnings(False) | |
# Pins | |
ain1 = 16 | |
ain2 = 20 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import required modules | |
import time | |
import RPi.GPIO as GPIO | |
# Declare the GPIO settings | |
GPIO.setmode(GPIO.BOARD) | |
# set up GPIO pins | |
GPIO.setup(7, GPIO.OUT) # Connected to PWMA |