39 lines
693 B
Python
39 lines
693 B
Python
#!/usr/bin/env python
|
|
|
|
# -*- coding: utf-8 -*-
|
|
"""
|
|
Created on Mon Feb 10 11:26:41 2020
|
|
|
|
@author: Maxi
|
|
"""
|
|
|
|
import RPi.GPIO as GPIO
|
|
# GPIO.setmode(GPIO.BOARD)
|
|
GPIO.setmode(GPIO.BCM)
|
|
|
|
"""
|
|
TODO
|
|
PWM1 und PWM0 beide freischalten
|
|
I2C aktivieren?
|
|
"""
|
|
|
|
# Pin Numbering a la GPIOxx (BCM)
|
|
# pwr33V = [1, 17]
|
|
# pwr5V = [2, 4]
|
|
# GND = [6, 9, 14, 20, 25, 30, 34, 39]
|
|
M_Elev_speed = sw_PWM = 4
|
|
M_Elev_dir = 14
|
|
M_Rot_speed = PWM1 = 18 # motor
|
|
M_Rot_dir = 15 # motor
|
|
M_Rot_enable = 24
|
|
M_Cam = PWM0 = 13 # motor
|
|
limit_stowed = 27
|
|
limit_stowed_out = 9
|
|
limit_raised = 17
|
|
limit_raised_out = 10
|
|
limit_forward = 22
|
|
limit_forward_out = 11
|
|
limit_tilt = 23
|
|
limit_tilt_out = 8
|
|
I2C = {'Data': 2, 'Clock': 3}
|