commiting code that didnt work properly on new branch
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#ifndef MOTOR_DRIVER_H
|
||||
#define MOTOR_DRIVER_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// Vélbúnaðar-PWM á Timer1: AIN1 = OC1A = PB1 (D9), AIN2 = OC1B = PB2 (D10)
|
||||
class Motor_driver {
|
||||
public:
|
||||
Motor_driver();
|
||||
void init(uint16_t top = 799); //
|
||||
void set_duty_cycleA(int percent); // 0-100%, AIN1
|
||||
void set_duty_cycleB(int percent); // 0-100%, AIN2
|
||||
|
||||
private:
|
||||
uint16_t top_value;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user