SPQR-Team-2019-REVAMPED/include/motors_movement/motor.h

23 lines
400 B
C
Raw Normal View History

#pragma once
2019-10-21 08:06:37 +02:00
#include <Arduino.h>
#include "behaviour_control/complementary_filter.h"
#define DRIVE_DURATION_MS 5
2019-10-21 08:06:37 +02:00
class Motor {
public:
Motor(int a, int b, int pwm, int angle);
2019-11-13 16:26:03 +01:00
Motor();
void drive(int speed);
2020-03-03 11:52:39 +01:00
void test();
2021-05-07 21:39:03 +02:00
void stop();
2019-10-21 08:06:37 +02:00
public:
int angle;
2019-10-21 08:06:37 +02:00
private:
int pinA, pinB, pinPwm;
ComplementaryFilter* filter;
2019-10-21 08:06:37 +02:00
};