started with class for motorcontroller
This commit is contained in:
parent
c3345ea5c2
commit
f739f34f75
7
raspberry/leds.py
Normal file
7
raspberry/leds.py
Normal 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
13
raspberry/motors.py
Normal 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
10
raspberry/terradrone.py
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
####################################################################
|
||||||
|
# This file contains the main code to control the robot.
|
||||||
|
#
|
||||||
|
####################################################################
|
||||||
|
|
||||||
|
def main():
|
||||||
|
pass
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
Loading…
x
Reference in New Issue
Block a user