yotaro morizumi / Mbed 2 deprecated zoomy_customLibrary

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers DCmotor.hpp Source File

DCmotor.hpp

00001 #pragma once
00002 #include<mbed.h>
00003 #include<portSet.hpp>
00004 
00005 class DCmotor
00006 {
00007 public:
00008     DCmotor(Port motor, float max_pwm, float min_pwm, bool CW_flag);
00009     DCmotor(PinName pin_a, PinName pin_b, float max_pwm, float min_pwm, bool CW_flag);
00010     void drive(float pwm);
00011 private:
00012     Port motor_;
00013     float max_pwm_;
00014     float min_pwm_;
00015     bool CW_flag_;
00016 };