Avinash Repaka / Mbed 2 deprecated Lab4_519

Dependencies:   mbed

Committer:
avinashr
Date:
Thu Mar 26 02:25:46 2015 +0000
Revision:
1:4ec28912c9e7
Child:
2:2cc70773996b
Motors and Keypad working

Who changed what in which revision?

UserRevisionLine numberNew contents of line
avinashr 1:4ec28912c9e7 1 #include "mbed.h"
avinashr 1:4ec28912c9e7 2
avinashr 1:4ec28912c9e7 3 /*Right Door Actuator*/
avinashr 1:4ec28912c9e7 4
avinashr 1:4ec28912c9e7 5 class RightServoMotor {
avinashr 1:4ec28912c9e7 6 private:
avinashr 1:4ec28912c9e7 7 PwmOut outputPin;
avinashr 1:4ec28912c9e7 8 public:
avinashr 1:4ec28912c9e7 9 RightServoMotor (PinName outputPin_): outputPin(outputPin_) {outputPin.period(0.020);}
avinashr 1:4ec28912c9e7 10 void open();
avinashr 1:4ec28912c9e7 11 void close();
avinashr 1:4ec28912c9e7 12 };
avinashr 1:4ec28912c9e7 13
avinashr 1:4ec28912c9e7 14 void RightServoMotor::open(){
avinashr 1:4ec28912c9e7 15 outputPin = 0.125f;
avinashr 1:4ec28912c9e7 16 }
avinashr 1:4ec28912c9e7 17
avinashr 1:4ec28912c9e7 18 void RightServoMotor::close(){
avinashr 1:4ec28912c9e7 19 outputPin = 0.075f;
avinashr 1:4ec28912c9e7 20 }