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-03-14
- Revision:
- 7:950b3c3b5a2b
- Parent:
- 6:2ffa254e8f6e
- Child:
- 10:836e701d00a6
File content as of revision 7:950b3c3b5a2b:
#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, 30);
i++;
break;
case(1):
gimbal.servo(PITCHID, control.pitch, 30);
i++;
break;
case(2):
gimbal.servo(ROLLID, control.roll, 30);
i = 0;
break;
}
}