Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BLE_nRF8001 mbed
Homepage
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. You can change the following macro to specify which pin to be controlled.
DigitalInOut DIGITAL_OUT_PIN( PTD4 );
DigitalInOut DIGITAL_IN_PIN( PTA12 );
PwmOut pwm( PTA4 );
Servo myservo( PTA13 );
AnalogIn analog( PTB0 );
The application will report the state of DIGITAL_IN_PIN and ANALOG_IN_PIN to App. The App can control the state of DIGITAL_OUT_PIN / PWM_PIN / SERVO_PIN.
You have to change the belowing constructs manually corresponding to the platform you are using.
SPI spi(PTD2, PTD3, PTD1);
DigitalInOut BLE_RDY(PTA12);
DigitalInOut BLE_REQ(PTA2);