-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrov.cpp
38 lines (28 loc) · 864 Bytes
/
rov.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
Example uses a static library to show off generate_arduino_library().
This example code is in the public domain.
*/
#include "Common.h"
#include <Wire.h>
#include <ArduinoNunchuk.h>
#include "Common.h"
#include "ROVNunchukController.h"
#include "ROVAlgorithms.h"
#include "ROVMotorController.h"
#define BAUDRATE 19200
ROVSimpleControlAlgorithm algorithm = ROVSimpleControlAlgorithm();
ROVNunchukController controller = ROVNunchukController(algorithm);
ROVTB6612FNGMotorController motorController = ROVTB6612FNGMotorController();
void setup()
{
Serial.begin(BAUDRATE);
Serial.println("Hello World");
controller.initialize();
}
void loop()
{
ROVMotorSettings settings = controller.motorSettings();
motorController.setMotors(settings);
}