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.
function.h
- Committer:
- choutin
- Date:
- 2016-08-23
- Revision:
- 2:95555e722c03
- Parent:
- 1:3d05c0de31ae
File content as of revision 2:95555e722c03:
void close_hand(void) {
PwmOut mypwm(PB_3);
int i,degree;
mypwm.period_ms(20); //20ms
degree=0;
i=500+degree*1900/180;
mypwm.pulsewidth_us(i);
}
void close_arm(void) {
PwmOut mypwm(PB_3);
int i,degree;
mypwm.period_ms(20); //20ms
degree=0;
i=500+degree*1900/180;
mypwm.pulsewidth_us(i);
}
void open_hand(void) {
PwmOut mypwm(PWM_OUT);
int i,degree;
mypwm.period_ms(20); //20ms
degree=180;
i=500+degree*1900/180;
mypwm.pulsewidth_us(i);
}
void open_arm(void) {
PwmOut mypwm(PWM_OUT);
int i,degree;
mypwm.period_ms(20); //20ms
degree=180;
i=500+degree*1900/180;
mypwm.pulsewidth_us(i);
}
void lift(void) {
PwmOut mypwm(PWM_OUT);
int i,degree;
mypwm.period_ms(20); //20ms
degree=180;
i=500+degree*1900/180;
mypwm.pulsewidth_us(i);
}
void move(int right,int left){
PwmOut mypwm(PWM_OUT);
int i,degree;
mypwm.period_ms(20); //20ms
degree=180;
i=500+degree*1900/180;
mypwm.pulsewidth_us(i);
}