Difference between revisions of "Category:BLE"

From Inspired-Lua Wiki
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
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, through a Lua module, available with ''require "ble"''
+
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 />
+
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.
Compatible devices can be of different sorts : sensors, microcontrollers-equipped boards (little robots. etc !) ...
+
<br><br>
<br />
+
A sample script by Fred Fotsch is available here: http://education.ti.com/en/tisciencenspired/us/detail?id=98CD6AF24B5643EDA3BD8C261DEEB9FB&t=A8635C77876A41AE90122589985F5703
Monre information and tutorials about this feature will be coming sometime soon, when TI releases its dedicated documentation.
+
<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 />
 +
Tables <b>ble</b> and <b>bleCentral</b> are then available.
 +
</p><p><b>ble</b>
 +
</p>
 +
: ble.OFF
 +
: ble.ON
 +
: ble.RESETTING
 +
: ble.UNSUPPORTED
 +
: ble.addStateListener
 +
: ble.pack
 +
: ble.removeStateListener
 +
: ble.unpack
 +
 
 +
<p><b>bleCentral</b></p>
 +
: bleCentral.isScanning
 +
: bleCentral.startScanning
 +
: bleCentral.stopScanning
 +
 
 +
<br>
 +
<p>''Other additions include:''</p>
 +
 
 +
'''PeripheralClass'''
 +
: getName
 +
: getState
 +
: connect
 +
: disconnect
 +
: discoverServices
 +
: getServices
 +
 
 +
'''ServiceClass'''
 +
: getUUID
 +
: discoverCharacteristics
 +
: getCharacteristics
 +
 
 +
'''CharacteristicClass'''
 +
: getUUID
 +
: setValueUpdateListener
 +
: setWriteCompleteListener
 +
: read
 +
: setNotify
 +
: getValue
 +
: write
  
 
<br />
 
<br />

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.