![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
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
servoloop.h
- Committer:
- sandwich
- Date:
- 2014-07-11
- Revision:
- 25:4f2f441eceec
File content as of revision 25:4f2f441eceec:
#pragma once #include "mbed.h" //class to aid with vision feedback //taken from // https://github.com/charmedlabs/pixy/blob/master/arduino/libraries/Pixy/examples/pantilt/pantilt.ino #define RCS_MIN_POS 0L #define RCS_MAX_POS 1000L #define RCS_CENTER_POS ((RCS_MAX_POS-RCS_MIN_POS)/2) class ServoLoop { public: ServoLoop(int32_t pgain, int32_t dgain); void update(int32_t error); int32_t m_pos; int32_t m_prevError; int32_t m_pgain; int32_t m_dgain; };