NerfUS / Servomotor

Dependents:   ServomotorTests NerfUSTarget

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers RealServomotor.cpp Source File

RealServomotor.cpp

00001 #include "RealServomotor.hpp"
00002 #include "mbed.h"
00003 
00004 RealServomotor::RealServomotor(PwmOutInterface &pwm_out) : 
00005     Servomotor(pwm_out),
00006     pwm_out(pwm_out)
00007 {
00008 }
00009 
00010 void RealServomotor::set_position_down()
00011 {
00012     set_angle(0);
00013     wait_ms(300);
00014     pwm_out.pulsewidth_us(0);
00015 }