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: mbed ros_lib_kinetic
gimbal.cpp
- Committer:
- MikeGray92
- Date:
- 2018-12-14
- Revision:
- 15:aeb817f93336
- Parent:
- 10:836e701d00a6
File content as of revision 15:aeb817f93336:
#include <stdint.h> #include "mbed.h" #include <ros.h> #include <std_msgs/Empty.h> #include <std_msgs/Int32MultiArray.h> #include <BNO055.h> #include <initializations.h> #include <definitions.h> #include <prototypes.h> #include <Mx28.h> static int i = 0; //Variable to only update one servo each loop. void runGimbal(void){ switch(i){ case(0): gimbal.servo(YAWID, control.yaw, control.yawSpeed); i++; break; case(1): gimbal.servo(PITCHID, control.pitch, control.pitchSpeed); i++; break; case(2): gimbal.servo(ROLLID, control.roll, control.rollSpeed); i = 0; break; } }