RedBearLab / Mbed 2 deprecated nRF8001_SimpleControls

Dependencies:   BLE_nRF8001 mbed

Committer:
RedBearLab
Date:
Wed Oct 22 05:01:13 2014 +0000
Revision:
0:4c34e71b2f6a
Child:
1:d743c358f812
First commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
RedBearLab 0:4c34e71b2f6a 1 #ifndef _SERVO_H
RedBearLab 0:4c34e71b2f6a 2 #define _SERVO_H
RedBearLab 0:4c34e71b2f6a 3
RedBearLab 0:4c34e71b2f6a 4 #include "mbed.h"
RedBearLab 0:4c34e71b2f6a 5
RedBearLab 0:4c34e71b2f6a 6 class Servo
RedBearLab 0:4c34e71b2f6a 7 {
RedBearLab 0:4c34e71b2f6a 8 public:
RedBearLab 0:4c34e71b2f6a 9 Servo(PinName pin);
RedBearLab 0:4c34e71b2f6a 10 ~Servo(void);
RedBearLab 0:4c34e71b2f6a 11
RedBearLab 0:4c34e71b2f6a 12 void write(unsigned char degree);
RedBearLab 0:4c34e71b2f6a 13
RedBearLab 0:4c34e71b2f6a 14 private:
RedBearLab 0:4c34e71b2f6a 15 void convert(unsigned char degree);
RedBearLab 0:4c34e71b2f6a 16
RedBearLab 0:4c34e71b2f6a 17 PwmOut _servo;
RedBearLab 0:4c34e71b2f6a 18 unsigned int pulse;
RedBearLab 0:4c34e71b2f6a 19 };
RedBearLab 0:4c34e71b2f6a 20
RedBearLab 0:4c34e71b2f6a 21 #endif