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_API mbed nRF51822_BLE_MIDI
Dependents: BLE_MIDI_one_note_TEST
Fork of BLE_MIDI by
Diff: main.cpp
- Revision:
- 1:cba2eba64f5c
- Parent:
- 0:83889dc90473
- Child:
- 2:dbc6f81b9ba0
--- a/main.cpp Thu Apr 02 05:17:14 2015 +0000
+++ b/main.cpp Fri Apr 03 04:24:01 2015 +0000
@@ -6,6 +6,7 @@
BLEMIDI bleMidi(&device);
DigitalOut led1(P0_0);
+InterruptIn button(P0_1);
void disconnectionCallback(Gap::Handle_t handle, Gap::DisconnectionReason_t reason) {
bleMidi.onBleDisconnection(handle, reason);
@@ -17,16 +18,16 @@
void onNoteOn(uint8_t channel, uint8_t note, uint8_t velocity) {
led1 = 1;
-// if (bleMidi.connected()) {
-// bleMidi.sendNoteOn(channel, note, velocity);
-// }
+ if (bleMidi.connected()) {
+ bleMidi.sendNoteOn(channel, note, velocity);
+ }
}
void onNoteOff(uint8_t channel, uint8_t note, uint8_t velocity) {
led1 = 0;
-// if (bleMidi.connected()) {
-// bleMidi.sendNoteOff(channel, note, velocity);
-// }
+ if (bleMidi.connected()) {
+ bleMidi.sendNoteOff(channel, note, velocity);
+ }
}
int main(void) {
