Page 1 of 1

Simple UART BLE App

Posted: 00:31, 15 Jan 2016
by llrjt100
I'm new to Evothings and want to create a simple app which will send and receive strings over a BLE UART. I'm using the Adafruit BlueFruit LE UART Friend which I have connected to a Teensy 3.2 (simple TTL RX/TX pins - no SPI necessary).

The Evothings ble-scan and ble-discovery examples run fine, and I can see the Adafruit BlueFruit LE UART Friend. Using the Adafruit BlueFruit LE App, I can send and receive strings to the Arduino IDE Serial Monitor window (I've got a very simple serial command program running on the Teensy).

Problem is, I'm really struggling to workout how to create a simple app which will send a string over BLE. I understand the index.html file and how to setup buttons, but I can't work out the rest - I'd be very grateful for a skeleton bit of code with a single button to send a string over the BLE UART and to receive a string.

Many thanks,
Richard

Re: Simple UART BLE App

Posted: 20:39, 19 Jan 2016
by Fredrik
Our arduino-ble example uses a form of BLE UART. Check out its app.js file. The functions "on", "off", "write", "startReading" and "getServices" will be of interest.