So I have this box of RFduino http://www.rfduino.com/ stuff, and I'd like to integrate it with The Thing System.
RFduino is a Arduino compatible with integrated Bluetooth Low Energy (BLE). It currently shows up on TTS dashboard under presence. The RFduino provides one custom BLE service with a read characteristic, a write characteristic and 3rd characteristic to disconnect.
RFduino is designed so that all the implementations use the same BLE service. The Arduino API let's the sketch define a service name to tell what service is being provided.
https://gist.github.com/don/7947381#file-temperature-ino-L14
For an iOS client, I get the RFduino service name as part of the AdvertisementData passed to didDiscoverPeripheral. The name is parsed out of the Manufacturer Data Field. https://github.com/don/cordova-plugin-rfduino/blob/master/src/ios/CBPeripheral%2BExtensions.m#L53
So, how would I go about integrating this into TTS? I'd like to start with 2 simple examples
The default temperature sketch which could display the temp on the dashboard. https://gist.github.com/don/7947381#file-temperature-ino
The LED sketch could allow TTS to actuate the LED and report it's status to the dashboard. https://gist.github.com/don/7947381#file-ledbutton-ino
EDIT 2013-12-13: RFduino is re-arranging their docs and code. Created gists for source code that was moved. See RFduino's site for the latest documentation and code. http://www.rfduino.com/documentation.html http://www.rfduino.com/download.html
RFduino is a Arduino compatible with integrated Bluetooth Low Energy (BLE). It currently shows up on TTS dashboard under presence. The RFduino provides one custom BLE service with a read characteristic, a write characteristic and 3rd characteristic to disconnect.
RFduino is designed so that all the implementations use the same BLE service. The Arduino API let's the sketch define a service name to tell what service is being provided.
https://gist.github.com/don/7947381#file-temperature-ino-L14
For an iOS client, I get the RFduino service name as part of the AdvertisementData passed to didDiscoverPeripheral. The name is parsed out of the Manufacturer Data Field. https://github.com/don/cordova-plugin-rfduino/blob/master/src/ios/CBPeripheral%2BExtensions.m#L53
So, how would I go about integrating this into TTS? I'd like to start with 2 simple examples
The default temperature sketch which could display the temp on the dashboard. https://gist.github.com/don/7947381#file-temperature-ino
The LED sketch could allow TTS to actuate the LED and report it's status to the dashboard. https://gist.github.com/don/7947381#file-ledbutton-ino
EDIT 2013-12-13: RFduino is re-arranging their docs and code. Created gists for source code that was moved. See RFduino's site for the latest documentation and code. http://www.rfduino.com/documentation.html http://www.rfduino.com/download.html

View 12 previous comments
- Alasdair AllanOwnerJan 2, 2014
- I'd like to add the RFduino as a device too, I need to work up a second example of using node to control the LED or a servo.Jan 2, 2014
- How're you getting on Don?Jan 17, 2014
- I added a 2nd example for the RGB Pushbutton Shield. This receives the button state from the RFduino and controls the LED from Node. https://github.com/don/rfduino-js/blob/master/ledButton.js
The Temperature example could use TSRP to report values. Since the LED example controls the RFduino, I'll need tigher integration with TSS. +Alasdair Allan or +Marshall Rose what's the next step? Do I write a driver?Jan 17, 2014 - Alasdair AllanOwnerNo, you can implement it as a Simple Thing Protocol (STP) thing rather than a Thing Sensor Reporting Protocol (TSRP) thing. See http://thethingsystem.com/dev/Simple-Thing-Protocol.html for more on that.Jan 17, 2014
- Alasdair AllanOwnerSTP is a bit more heavy weight than TSRP, but you can just about cram it into an Arduino.Jan 17, 2014