That’s awesome! Do you mind if I share that video on social media?
As for sending data back to the app, I just added support for it! If you get latest, you will see the updated custom_data_service app with the changes. So you simply need to call BLE.sendData() and it will append the header (basically just the byte that identifies the service) and send it back. So you don’t need to worry about appending the header on the bluz side, but you will need to check for it in your app. Anything with a header of 1 and 2 should be ignored.
Also, I did change the CUSTOM_DATA_SERVICE id from 3 to 4. The fact that our EOS buffer is 0x03, 0x04 means that someone could mess things up if they tried to send the byte 0x04 through this system. So instead of adding for 0x03 to your data in the app, you should change it to 0x04. Same when you check the data, check for 0x04. Sorry for the inconvenience on that, but I figure it is better to do it now before more people start using it.
One other note, the data you get in your data callback is in a high level interrupt, so you shouldn’t put any blocking code in there. You aren’t, so that’s fine, but you can see how I basically moved the BLE.sendData outside of that and put it into the main loop and triggered it with a flag. This way there is no chance of anything hanging in that main callback. If you put blocking code in there, it could interrupt the BLE functionality.
Let me know if you have any more issues or questions, I think now that you can send data back you should have everything you need!