The UART implementation is two-way, just like a normal serial port. It's how you get the command prompt in the Web IDE. To write to the BLE UART in Espruino, you just use console.log or print - or if you want to do it 'direct' (without it also trying to output the command prompt as well) you can use Bluetooth.write.
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.
The UART implementation is two-way, just like a normal serial port. It's how you get the command prompt in the Web IDE. To write to the BLE UART in Espruino, you just use
console.log
orprint
- or if you want to do it 'direct' (without it also trying to output the command prompt as well) you can use Bluetooth.write.You should be able to find some examples for whatever language you prefer using... For Node.js there's this: https://www.npmjs.com/package/node-uartble
But the library I use for the Web IDE when running under Node.js is: https://github.com/espruino/EspruinoTools/blob/gh-pages/core/serial_noble.js
and the one I use when running under Web Bluetooth is:
https://github.com/espruino/EspruinoTools/blob/gh-pages/core/serial_web_bluetooth.js