I've found the python3 example code by now -but somehow this does not work on my pi:
pi@millow:~ $ python3 bluepi_uart.py c4:f0:3e:4d:c2:9d
Traceback (most recent call last):
File "bluepi_uart.py", line 34, in <module>
nustx.write(command[0:20]);
File "/home/pi/.local/lib/python3.5/site-packages/bluepy/btle.py", line 200, in write
return self.peripheral.writeCharacteristic(self.valHandle, val, withResponse)
File "/home/pi/.local/lib/python3.5/site-packages/bluepy/btle.py", line 542, in writeCharacteristic
self._writeCmd("%s %X %s\n" % (cmd, handle, binascii.b2a_hex(val).decode('utf-8')))
TypeError: a bytes-like object is required, not 'str'
This is on a pi with python 3.5, bluepi itself seems to work and run. Also I would like to use python3 - but I am really not an expert here. Any ideas?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I've found the python3 example code by now -but somehow this does not work on my pi:
This is on a pi with python 3.5, bluepi itself seems to work and run. Also I would like to use python3 - but I am really not an expert here. Any ideas?