PicoLowLevel
Loading...
Searching...
No Matches
Motor.h
Go to the documentation of this file.
1
#ifndef MOTOR_H
2
#define MOTOR_H
3
4
#include <Arduino.h>
5
#include "
definitions.h
"
6
10
class
Motor
{
11
public
:
12
Motor
(
byte
pwm,
byte
dir,
bool
invert =
false
);
13
void
begin
();
14
void
write
(
int
value);
15
16
private
:
17
byte
pwm, dir;
18
bool
invert;
19
};
20
21
#endif
Motor
Motor class used to control simple DC motors.
Definition
Motor.h:10
Motor::begin
void begin()
Initialize motors.
Definition
Motor.cpp:16
Motor::write
void write(int value)
Sets the motor speed.
Definition
Motor.cpp:25
definitions.h
lib
Motor
src
Motor.h
Generated by
1.9.8