Ok, I just created an example for you that should work:
# based on https://github.com/rlangoy/bluepy_examples_nRF51822_mbed/blob/master/writeLed2.py
from bluepy.btle import UUID, Peripheral
if len(sys.argv) != 2:
print "Fatal, must pass device address:", sys.argv, "<device address="">"
p = Peripheral(sys.argv, "random")
ch = UartService.getCharacteristics(UUID("6E400002-B5A3-F393-E0A9-E50E24DCCA9E"))
# \x03 -> Ctrl-C clears line
# \x10 -> Echo off for line so don't try and send any text back
In your case the text you want to write will be more than 20 characters, so you'll need to write it in 20 character chunks
© Espruino, powered by microcosm.
Report a problem