This is the source code companion for raspberrypi-bluetooth.com. Start there for a full explanation of how to get a Raspberry Pi setup to run as a Bluetooth peripheral.
markjlorenz/raspberry-pi-bluetooth-low-energy
Code samples for https://www.raspberrypi-bluetooth.com
C