From ff9cefa6b29e94b01b32707db41480bf7aa3adeb Mon Sep 17 00:00:00 2001 From: Glenn Ruben Bakke Date: Sat, 11 Feb 2017 18:09:22 +0100 Subject: [PATCH] nrf5/modules: Adding a few examples in the modubluepy.h to get easier copy paste when implementing. --- nrf5/modules/ubluepy/modubluepy.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/nrf5/modules/ubluepy/modubluepy.h b/nrf5/modules/ubluepy/modubluepy.h index df534b37d0..959704418b 100644 --- a/nrf5/modules/ubluepy/modubluepy.h +++ b/nrf5/modules/ubluepy/modubluepy.h @@ -27,6 +27,25 @@ #ifndef UBLUEPY_H__ #define UBLUEPY_H__ +/* Examples: + +Advertisment: + +from ubluepy import Peripheral +p = Peripheral() +p.advertise(device_name="MicroPython") + +DB setup: + +from ubluepy import Service, Characteristic, UUID +u0 = UUID("6e400001-b5a3-f393-e0a9-e50e24dcca9e") +s = Service(u0) +u1 = UUID("6e400002-b5a3-f393-e0a9-e50e24dcca9e") +c = Characteristic(u1) +s.addCharacteristic(c) + +*/ + #include "py/obj.h" extern const mp_obj_type_t ubluepy_uuid_type;