Skip to content
This repository was archived by the owner on Aug 27, 2021. It is now read-only.

Example: Simple Bluetooth controlled LED

JBtje edited this page Jun 5, 2015 · 2 revisions
5 //
6 // "Simple BLE service to turn an LED on/off"
7 //
10 ADVERT GENERAL
20 ADVERT "25FB9E91-1616-448D-B5A3-F70A64BDA73A"
30 ADVERT END
40 GATT SERVICE "25FB9E91-1616-448D-B5A3-F70A64BDA73A"
50 GATT CHARACTERISTIC "D8ABBBE7-F10B-4EC3-B781-DBCBD2334400" "On/Off"
60 GATT READ WRITE A ONWRITE GOSUB 200
70 GATT END
80 PINMODE P0(0) OUTPUT
90 GOSUB 200
100 RETURN
200 P0(0) = A
210 RETURN

More info here (ADVERT) and here (GATT) and here (PINMODE)

Clone this wiki locally