Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: IMU MODSERIAL Servo mbed
Fork of RTOS_Controller by
main.cpp
00001 // Continuously sweep the servo through it's full range 00002 #include "mbed.h" 00003 #include "vessel.h" 00004 //#include "MS5803.h" 00005 //MS5803 big_sensor = MS5803(I2C_SDA, I2C_SCL, ms5803_addrCH); 00006 00007 int main() 00008 { 00009 Timer t; 00010 wait(3); 00011 Vessel seagoat; //Starts the seagoat 00012 seagoat.SetYawPID(1,0,0); 00013 seagoat.SetRollPID(1,0,0); 00014 seagoat.SetPitchPID(1,0,0); 00015 seagoat.SetXPID(0,0,0); 00016 seagoat.SetYPID(0,0,0); 00017 seagoat.SetZPID(0,0,0); 00018 00019 t.start(); 00020 while(t.read() < 4){ 00021 seagoat.calibrate(); 00022 00023 //pc.printf("%f \n", t.read()); 00024 } 00025 t.stop(); 00026 pc.printf("Seagoat Ready to Go\n\r"); 00027 //seagoat.motorTest(); 00028 float depth = 0; 00029 while(1) { 00030 //seagoat.motorTest(); 00031 seagoat.update(); 00032 seagoat.updateCommand(); 00033 wait(0.01); 00034 } 00035 }
Generated on Wed Jul 20 2022 08:57:37 by
1.7.2
