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.
Fork of Nucleo_CaitSith_Firmware by
RobotArm.cpp
- Committer:
- YosukeK
- Date:
- 2014-09-11
- Revision:
- 0:a9b204e27472
File content as of revision 0:a9b204e27472:
/*
Controller firmware for CaitSithDanger
Kyoto-Densou-An 2014
Author : yishii
*/
#include <mbed.h>
#include <RobotArm.h>
RobotArm::RobotArm(PinName pin1,PinName pin2)
{
mPwmServo[0] = new PwmServo(pin1);
mPwmServo[1] = new PwmServo(pin2);
}
RobotArm::~RobotArm()
{
delete mPwmServo[0];
delete mPwmServo[1];
}
void RobotArm::actuate(int angle1,int angle2)
{
mPwmServo[0]->setAngle(angle1);
mPwmServo[1]->setAngle(angle2);
}
