Difference between revisions of "Category:BLE"

From Inspired-Lua Wiki
Jump to navigation Jump to search
(updated BLE docs)
 
Line 2: Line 2:
 
"BLE" means "'''Bluetooth Low Energy'''". You can find more info about this technology [https://en.wikipedia.org/wiki/Bluetooth_low_energy on Wikipedia]<br />
 
"BLE" means "'''Bluetooth Low Energy'''". You can find more info about this technology [https://en.wikipedia.org/wiki/Bluetooth_low_energy on Wikipedia]<br />
 
<br />
 
<br />
With the release 3.11 of the Nspire iPad app, TI introduced the ability to communicate with any BLE-compatible device, which can be of different sorts: some sensors, some microcontrollers-equipped boards (little robots. etc !)... or anything that features a BLE chip.
+
With the release 3.11 of the Nspire iPad app, TI introduced the ability to communicate with any BLE-compatible device, which can be of different sorts: some sensors, some microcontrollers-equipped boards (little robots. etc !)... or anything that features a BLE chip.<br/>
<br />
 
<br />
 
 
In early April 2015, TI updated its [http://education.ti.com/~/media/4A9A2F6B391A49E4BE07B606F699189A Lua API documentation], which now includes a chapter about the BLE APIs.
 
In early April 2015, TI updated its [http://education.ti.com/~/media/4A9A2F6B391A49E4BE07B606F699189A Lua API documentation], which now includes a chapter about the BLE APIs.
<br />
+
<br><br>
<br />
 
 
A sample script by Fred Fotsch is available here: http://education.ti.com/en/tisciencenspired/us/detail?id=98CD6AF24B5643EDA3BD8C261DEEB9FB&t=A8635C77876A41AE90122589985F5703
 
A sample script by Fred Fotsch is available here: http://education.ti.com/en/tisciencenspired/us/detail?id=98CD6AF24B5643EDA3BD8C261DEEB9FB&t=A8635C77876A41AE90122589985F5703
 +
<br>
 +
Several tutorials related to BLE have been created by Steve Arnold and are available on his website: http://compasstech.com.au/TNS_Authoring/Scripting/script_tut30.html
  
 
+
== The API ==
 
<p>[[:Category:BLE|BLE]] features are available with the "ble"/"bleCentral" modules (code&nbsp;: <b> <i>require "ble"</i></b> and <b><i>require "bleCentral"</i> </b> at the top of the script, while in [[platform.apilevel|apilevel]] 2.5).<br />
 
<p>[[:Category:BLE|BLE]] features are available with the "ble"/"bleCentral" modules (code&nbsp;: <b> <i>require "ble"</i></b> and <b><i>require "bleCentral"</i> </b> at the top of the script, while in [[platform.apilevel|apilevel]] 2.5).<br />
 
Tables <b>ble</b> and <b>bleCentral</b> are then available.
 
Tables <b>ble</b> and <b>bleCentral</b> are then available.
Line 29: Line 28:
 
: bleCentral.stopScanning
 
: bleCentral.stopScanning
  
 +
<br>
 
<p>''Other additions include:''</p>
 
<p>''Other additions include:''</p>
  

Latest revision as of 21:45, 30 July 2015

Description

"BLE" means "Bluetooth Low Energy". You can find more info about this technology on Wikipedia

With the release 3.11 of the Nspire iPad app, TI introduced the ability to communicate with any BLE-compatible device, which can be of different sorts: some sensors, some microcontrollers-equipped boards (little robots. etc !)... or anything that features a BLE chip.
In early April 2015, TI updated its Lua API documentation, which now includes a chapter about the BLE APIs.

A sample script by Fred Fotsch is available here: http://education.ti.com/en/tisciencenspired/us/detail?id=98CD6AF24B5643EDA3BD8C261DEEB9FB&t=A8635C77876A41AE90122589985F5703
Several tutorials related to BLE have been created by Steve Arnold and are available on his website: http://compasstech.com.au/TNS_Authoring/Scripting/script_tut30.html

The API

BLE features are available with the "ble"/"bleCentral" modules (code : require "ble" and require "bleCentral" at the top of the script, while in apilevel 2.5).
Tables ble and bleCentral are then available.

ble

ble.OFF
ble.ON
ble.RESETTING
ble.UNSUPPORTED
ble.addStateListener
ble.pack
ble.removeStateListener
ble.unpack

bleCentral

bleCentral.isScanning
bleCentral.startScanning
bleCentral.stopScanning


Other additions include:

PeripheralClass

getName
getState
connect
disconnect
discoverServices
getServices

ServiceClass

getUUID
discoverCharacteristics
getCharacteristics

CharacteristicClass

getUUID
setValueUpdateListener
setWriteCompleteListener
read
setNotify
getValue
write


This category currently contains no pages or media.