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 BufferedSerial mbed nRF51822
Fork of MIDI-to-BLE-MIDI-bridge by
Revision 1:5cdcb9c72948, committed 2017-06-12
- Comitter:
- niklasjakob
- Date:
- Mon Jun 12 17:14:01 2017 +0000
- Parent:
- 0:244f1d0a3810
- Commit message:
- BLE RECEIVER
Changed in this revision
--- a/BLE_API.lib Tue Aug 09 12:57:23 2016 +0000 +++ b/BLE_API.lib Mon Jun 12 17:14:01 2017 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/teams/Bluetooth-Low-Energy/code/BLE_API/#d494ad3e87bd +http://mbed.org/teams/Bluetooth-Low-Energy/code/BLE_API/#65474dc93927
--- a/main.cpp Tue Aug 09 12:57:23 2016 +0000
+++ b/main.cpp Mon Jun 12 17:14:01 2017 +0000
@@ -62,7 +62,7 @@
DigitalOut greenled(TX_LED); //
#endif
-
+Serial pc(USBTX, USBRX);
/******************************************************************************************************************************
*INITIALIZE VARIABLES, BUFFERS and BLE-MIDI Service and Characteristic
******************************************************************************************************************************/
@@ -335,7 +335,7 @@
int main(void)
{
-
+pc.baud(115200);
#if LIGHT_SHOW==1
redled = 1;
greenled = 1;
@@ -392,9 +392,12 @@
#if ONLY_BLEMIDI_to_MIDI==0
if(sendBLEMIDI_flag == true ) { // check if the flag is set
+ uint8_t buf[TXRX_BUF_LEN];
+ uint16_t bytesRead;
+ ble.readCharacteristicValue(midiCharacteristic.getValueAttribute().getHandle(),
+ buf, &bytesRead);
+ pc.putc(buf[1]);
- sendBLEMIDI_flag=false ;
- sendBLEMIDI() ; // parse MIDI Events from UART and send them over BLE
}
#endif
--- a/mbed.bld Tue Aug 09 12:57:23 2016 +0000 +++ b/mbed.bld Mon Jun 12 17:14:01 2017 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/4f6c30876dfa \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/093f2bd7b9eb \ No newline at end of file
--- a/nRF51822.lib Tue Aug 09 12:57:23 2016 +0000 +++ b/nRF51822.lib Mon Jun 12 17:14:01 2017 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/teams/Nordic-Semiconductor/code/nRF51822/#088f5738bf18 +http://mbed.org/teams/Nordic-Semiconductor/code/nRF51822/#c90ae1400bf2
