2023-03-25 18:11:18 -06:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
#
|
|
|
|
# mp101-pi-left
|
|
|
|
#
|
|
|
|
# Copyright (C) 2023, Jeff Moe
|
|
|
|
#
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
import RPi.GPIO as GPIO
|
|
|
|
import time
|
|
|
|
|
|
|
|
GPIO.setmode(GPIO.BCM)
|
|
|
|
|
2023-03-25 18:27:45 -06:00
|
|
|
GPIO.setup(6, GPIO.OUT) # Pin 31 GPIO6 Right
|
|
|
|
GPIO.setup(17, GPIO.OUT) # Pin 11 GPIO17 Up
|
|
|
|
GPIO.setup(16, GPIO.OUT) # Pin 36 GPIO16 Down
|
|
|
|
GPIO.setup(5, GPIO.OUT) # Pin 29 GPIO5 Left
|
2023-03-25 18:11:18 -06:00
|
|
|
|
2023-03-25 18:27:45 -06:00
|
|
|
print("Left GPIO 5")
|
|
|
|
GPIO.output(5, GPIO.HIGH)
|
2023-03-31 11:56:36 -06:00
|
|
|
time.sleep(0.1)
|
2023-03-25 18:27:45 -06:00
|
|
|
GPIO.output(5, GPIO.LOW)
|