From 4bd0a060d100c7fb9ad657c939b954b081b62016 Mon Sep 17 00:00:00 2001 From: EnricoGuccii Date: Tue, 23 Dec 2025 16:59:20 +0100 Subject: eee --- firmware/lib/motors/motors.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 firmware/lib/motors/motors.h (limited to 'firmware/lib/motors/motors.h') diff --git a/firmware/lib/motors/motors.h b/firmware/lib/motors/motors.h new file mode 100644 index 0000000..b7cc7f1 --- /dev/null +++ b/firmware/lib/motors/motors.h @@ -0,0 +1,29 @@ +#include +#include "settings.h" + +#pragma once + +class MOTORS +{ +public: + MOTORS(); + void init(); + + void forward(int speed, int duration = 0); + void backward(int speed, int duration = 0); + + void leftForward(int speed, int duration = 0); + void leftBackward(int speed, int duration = 0); + void rightForward(int speed, int duration = 0); + void rightBackward(int speed, int duration = 0); + + void leftTurn(int speed, int duration = 0); + void rightTurn(int speed, int duration = 0); + + void leftStop(); + void rightStop(); + void stop(); + +private: + int scaleSpeed(int speed); +}; \ No newline at end of file -- cgit v1.2.3