Simple UART BLE App

Ask, and ye shall receive.
llrjt100
Posts: 1
Joined: 00:24, 15 Jan 2016

Simple UART BLE App

Postby llrjt100 » 00:31, 15 Jan 2016

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

Fredrik
Site Admin
Posts: 196
Joined: 15:00, 18 Nov 2013

Re: Simple UART BLE App

Postby Fredrik » 20:39, 19 Jan 2016

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.


Return to “Questions and answers”

Who is online

Users browsing this forum: No registered users and 4 guests