My modifications/additions to the code

Dependencies:   ADXL345 ADXL345_I2C IMUfilter ITG3200 Servo fishgait mbed-rtos mbed pixy_cam

Fork of robotic_fish_ver_4_8 by jetfishteam

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 //#include "rtos.h"
00003 #include "Servo.h"
00004 //#include "rtos.h"
00005 //#include "PwmReader.h"
00006 //#include "PwmIn.h"
00007 #include "MainController.h"
00008 Serial pc(USBTX, USBRX);
00009 //Serial syren(p9,p10); //syren replaced the pololu controller
00010 Timer t;
00011 
00012 int main()
00013 {
00014     //syren.baud(38400);
00015     t.start();
00016 
00017     MainController mainCtrl;
00018 
00019     mainCtrl.start();
00020 
00021     printf("started\n");
00022     while(true) {
00023         //pc.printf("control: %d, frq: %.3f, vol: %.2f, amp: %.3f, yaw: %.2f, dut: %.2f, pit: %.2f, adj: %.2f, t: %.2f\n",
00024                 //  mainCtrl.getOpMode(), mainCtrl.getFrequency(), mainCtrl.getVolume(), mainCtrl.getAmplitude(), mainCtrl.getYaw(), mainCtrl.getDutyCycle(), mainCtrl.getPitch(), mainCtrl.getAdj(), t.read());
00025 
00026         //syren.putc(int(mainCtrl.getDutyCycle()));
00027         //wait_ms(100);
00028     }
00029     //t.stop();
00030     //mainCtrl.stop();
00031 }