Controller for Seagoat in the RoboSub competition

Dependencies:   Servo mbed

Fork of ESC by Matteo Terruzzi

Committer:
gelmes
Date:
Sat Jul 09 20:41:49 2016 +0000
Revision:
4:b37fd183e46a
Parent:
3:5ffe7e9c0bb3
Child:
5:07bbe020eb65
Implementing Update function that controls motors

Who changed what in which revision?

UserRevisionLine numberNew contents of line
gelmes 3:5ffe7e9c0bb3 1 // Continuously sweep the servo through it's full range
gelmes 3:5ffe7e9c0bb3 2 #include "mbed.h"
gelmes 3:5ffe7e9c0bb3 3 #include "vessel.h"
gelmes 3:5ffe7e9c0bb3 4
gelmes 3:5ffe7e9c0bb3 5 int main()
gelmes 3:5ffe7e9c0bb3 6 {
gelmes 3:5ffe7e9c0bb3 7 Vessel seagoat; //Starts the seagoat
gelmes 4:b37fd183e46a 8 seagoat.SetYawPID(1,0,0);
gelmes 4:b37fd183e46a 9 seagoat.SetRollPID(1,0,0);
gelmes 4:b37fd183e46a 10 seagoat.SetPitchPID(1,0,0);
gelmes 3:5ffe7e9c0bb3 11
gelmes 4:b37fd183e46a 12 while(1) {
gelmes 4:b37fd183e46a 13 seagoat.update();
gelmes 4:b37fd183e46a 14 wait(0.1);
gelmes 4:b37fd183e46a 15 }
gelmes 3:5ffe7e9c0bb3 16 }