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
gripper.cpp
00001 #include "gripper.h" 00002 #include "mbed.h" 00003 00004 Gripper::Gripper(PinName gripPin, PinName wristPin) : gripPwm(gripPin), wristPwm(wristPin) 00005 { 00006 gripPwm.period_us(PWM_PER); 00007 wristPwm.period_us(PWM_PER); 00008 gripPwm.pulsewidth_us(GRIP_DEF); 00009 wristPwm.pulsewidth_us(WRIST_DEF); 00010 } 00011 00012 void Gripper::grip() { gripPwm.pulsewidth_us(GRIP_CLOSE); } 00013 00014 void Gripper::release() { gripPwm.pulsewidth_us(GRIP_OPEN); } 00015 00016 void Gripper::lift() { wristPwm.pulsewidth_us(WRIST_UP); } 00017 00018 void Gripper::lower() { wristPwm.pulsewidth_us(WRIST_DOWN); }
Generated on Thu Jul 21 2022 02:31:05 by
1.7.2