started with class for motorcontroller

This commit is contained in:
Andreas Jönsson 2025-05-07 14:35:50 +02:00
parent c3345ea5c2
commit f739f34f75
3 changed files with 30 additions and 0 deletions

7
raspberry/leds.py Normal file
View File

@ -0,0 +1,7 @@
####################################################################
# This file contains the code to control the LEDs of the robot.
#
####################################################################
from gpiozero import LED
from time import sleep

13
raspberry/motors.py Normal file
View File

@ -0,0 +1,13 @@
####################################################################
# This file contains the code to control the motors of the robot.
#
# The motors are controlled using PWM signals.
# The code is designed to work with the L298N motor driver.
# The code is designed to work with the Raspberry Pi 5.
######################################################################
from gpiozero import Motor, PWMOutputDevice
from time import sleep
class Motor:
def __init__(self, motor_pin1, motor_pin2, pwm_pin):
pass

10
raspberry/terradrone.py Normal file
View File

@ -0,0 +1,10 @@
####################################################################
# This file contains the main code to control the robot.
#
####################################################################
def main():
pass
if __name__ == "__main__":
main()