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
motor_controller.h
00001 #pragma once 00002 #include "mbed.h" 00003 00004 #define FREQ_MIN 0.5 //Hz 00005 #define FREQ_MAX 3 //Hz 00006 00007 float sigm(float input); 00008 00009 class PololuMController 00010 { 00011 private: 00012 PwmOut pwm; 00013 DigitalOut outA; 00014 DigitalOut outB; 00015 00016 00017 public: 00018 PololuMController(); 00019 PololuMController(PinName pwmport, PinName A, PinName B); 00020 void setpolarspeed(float speed); //-1 to 1 00021 };
Generated on Sun Jul 17 2022 22:28:23 by 1.7.2