SimpleControls works with the BLEController iOS/Android App. The mbed's pin can acts as DIGITAL_IN, DIGITAL_OUT, PWM, SERVO, ANALOG_IN. The sketch is to show you how to control the pin as one of the abilities. Note that not every pin can own all of the abilities.
Dependencies: BLE_API mbed nRF51822
Servo.h
- Committer:
- RedBearLab
- Date:
- 2014-10-31
- Revision:
- 0:dfcebc1e442a
- Child:
- 1:f03072e32ed3
File content as of revision 0:dfcebc1e442a:
#ifndef _SERVO_H #define _SERVO_H #include "mbed.h" class Servo { public: Servo(PinName pin); ~Servo(void); void write(unsigned char degree); private: void convert(unsigned char degree); PwmOut _servo; unsigned int pulse; }; #endif