Bluetooth Low Energy

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderator: Klaus

Post Reply
Nonsanity
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 86
Joined: Thu May 17, 2007 9:15 pm
Contact:

Bluetooth Low Energy

Post by Nonsanity » Fri Nov 08, 2013 5:01 am

For a work project, I've been researching Bluetooth Low Energy (BLE), part of the Bluetooth 4.0 standard, and... It's going to be big. Move over QR Codes, RFID & NFC. For any short-range (<50m), non-streaming data transfer, paired or broadcasting, BLE is going to be it.

If you're not familiar with BLE, here are a few examples of existing and proposed use cases your smartphone can tap into:

* Proximity Detection - Lost your keys? Want more info on that museum exhibit before you? Want relevant coupons when standing at a store shelf?
* Biometric Sensors - Heart rate monitors, glucose monitors, step counters
* Home Automation - Track outlet power consumption on your phone, control lights and AC, remote control AV equipment
* Indoor Navigation - Where am I in this store/office building (that's blocking GPS)? How do I get to room 1301? Where is the closest bathroom/ATM/emergency exit?
* Maker Projects - Record model rocket telemetry, wireless weather station, dive tracking, etc...
* Education - Connect small, simple, battery-powered sensors to your software to interact with the world

Kickstarters for BLE projects abound, and several major chip manufacturers are pushing out these low-energy chipsets. Texas Instruments sees the future well, I think, and is even selling an inexpensive unit, the SensorTag ($25), directed at software developers. It is a little keychain-sized device that lasts 6 months to a year on a single coin cell battery and is packed with sensors such as IR remote temperature, ambient temperature, humidity, barometric pressure, accelerometer, magnetometer, and buttons.

All you need to be able to incorporate all that juicy wireless data is support for BLE communication, something that's hardware-supported by mid-to-latest generation iPhones, iPads, Android devices, newer laptops, and any computer with the addition of a cheap and tiny USB dongle—all the places Livecode can run.

A short while back I suggested adding support for Apple's iBeacons, but that's just the TIP of the BLE iceburg. If any of this sounded interesting to you, go read up on Bluetooth Low Energy and help support this feature request. This is exactly the sort of thing Livecode should support sooner rather than later, unless you want people turning to BASIC to make these sort of apps?
~ Nonsanity
~ Chris Innanen

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: Bluetooth Low Energy

Post by monte » Fri Nov 08, 2013 8:39 am

I've got an iOS BLE external started (I promised I'd do one if the kickstarter succeeded) but I've got quite a few projects on at the moment so it's on hold.
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Nonsanity
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 86
Joined: Thu May 17, 2007 9:15 pm
Contact:

Re: Bluetooth Low Energy

Post by Nonsanity » Fri Nov 08, 2013 5:10 pm

You add such great stuff to Livecode, Monte, and so much, as well. It's too bad this isn't under current development. Were you planning to support the BLE stack as well as the traditional Bluetooth format? Even a simplified GATT interface would add loads to Livecode's potential.

In the best of all worlds, seeing this functionality be part of Livecode out-of-the-box so that schools and home hobbyists with the Community Edition have access would be amazing. My mind is boggling with all the potential uses students alone will find. This is the sort of real-world interaction that gets kids excited about programming. Getting external data into Livecode has always been possible, but never exactly simple for the layperson. Just having a TI SensorTag in the room, it would be amazing to write just a few lines of code in Livecode and be able to, for example, get the room's temperature... or be alerted if the tag is moved... or just push a button on the tag and have something happen on the computer. Moving it all into the iOS platform just multiplies the possibilities.

However these features get added, I hope it is soon and widespread to the public.
~ Nonsanity
~ Chris Innanen

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: Bluetooth Low Energy

Post by monte » Sat Nov 09, 2013 6:46 am

@Nonsanity my solution will be commercial so it may not meet you're requirements
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Nonsanity
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 86
Joined: Thu May 17, 2007 9:15 pm
Contact:

Re: Bluetooth Low Energy

Post by Nonsanity » Sat Nov 09, 2013 7:35 am

Well, I'll buy it for sure, Monte, if it ends up being the first solution.

I still encourage this to be incorporated as an actual feature though. I really don't want to have to make my BLE apps with techBASIC. Ew.
~ Nonsanity
~ Chris Innanen

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: Bluetooth Low Energy

Post by monte » Sat Nov 09, 2013 10:42 am

I think the engine would be a gigabyte if everyone got everything they wanted in there. Maybe one day but I wouldn't bother to do an external if I thought it would be anytime soon. We know RunRevs roadmap for the next 6-12 months and it's not in there.
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Nonsanity
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 86
Joined: Thu May 17, 2007 9:15 pm
Contact:

Re: Bluetooth Low Energy

Post by Nonsanity » Sat Nov 09, 2013 4:50 pm

True, but that shouldn't discourage anyone from requesting a feature, or else what's the point of this particular forum? :)
~ Nonsanity
~ Chris Innanen

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: Bluetooth Low Energy

Post by monte » Sat Nov 09, 2013 9:43 pm

I'm actually not really sure what the point of the forum is. Perhaps discussing ideas? It seems to me that it's much more likely you will bring an idea to RunRev's notice by submitting an enhancement request.
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

CALL-151
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 206
Joined: Wed Oct 20, 2010 11:00 am

Re: Bluetooth Low Energy

Post by CALL-151 » Fri Nov 22, 2013 7:55 pm

Just adding my endorsement. We're about to see an explosion of BTLE-enabled devices. LiveCode will need to support it (engine or external) in order to remain relevant as a mobile development platform.

Nonsanity
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 86
Joined: Thu May 17, 2007 9:15 pm
Contact:

Re: Bluetooth Low Energy

Post by Nonsanity » Thu Dec 19, 2013 8:27 pm

Here's an upcoming device, the Cortado, that I'd love to integrate with Livecode. It's a small Arduino with BLE support that runs off a coin cell battery. RGB LED, accelerometer and breakout pins are all part of the tiny package. This can be hooked into all sorts of projects, with on-board processing and communication back to Livecode... IF Livecode had BLE support. Think about the educational possibilities, let alone the maker/hobbyist.

A slightly more involved alternate device that is available now is the RFDuino.

I've been using techBASIC to do my research into BLE location algorithms, an in-iPad IDE with BLE support. And while being able to edit code on-the-fly on the iPad as nice, I'd much rather have Livecode's far more robust and varied interface elements at my disposal.

I could keep listing new and upcoming hardware solutions that use BLE, that Livecode could one day communicate with and control, but the list would rapidly get out of hand. Home automation is already a huge category that can't be ignored. There are low-cost products out, or on the horizon, that allow both battery and outlet-powered devices to be monitored and switched on and off via BLE. Cheaper home lighting options with similar control won't be far behind (current options are rather expensive). We can expect HVAC and all manner of other electronic devices around the home to follow suit.

Livecode can already communicate in many different ways on each of the OSs it supports, but here's a chance for it to strike while the iron is hot. :)
~ Nonsanity
~ Chris Innanen

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: Bluetooth Low Energy

Post by monte » Fri Dec 20, 2013 6:24 am

OK, so I just pre-ordered the 4 pack with the free maker kit... how's that for a commitment to implement the externals?
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Nakia
Posts: 425
Joined: Tue Feb 21, 2012 8:57 am

Re: Bluetooth Low Energy

Post by Nakia » Fri Jan 17, 2014 4:31 am

monte wrote:OK, so I just pre-ordered the 4 pack with the free maker kit... how's that for a commitment to implement the externals?
If this Forum had a 'Like' button I would press it.

In all seriousness I think maybe opening up funding to this External would be a great idea and maybe a way for you to be able to work on it easier!

Nakia
Posts: 425
Joined: Tue Feb 21, 2012 8:57 am

Re: Bluetooth Low Energy

Post by Nakia » Fri Jan 17, 2014 4:51 am

I like this for a cheap device!
I have some plans for this little fella

http://www.ti.com/ww/en/wireless_connec ... stdroid-pr

CALL-151
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 206
Joined: Wed Oct 20, 2010 11:00 am

Re: Bluetooth Low Energy

Post by CALL-151 » Fri Jan 17, 2014 12:25 pm

I like this for a cheap device!
I have some plans for this little fella
Just understand that for now, you'll need techBASIC and/or Xcode to do anything meaningful with it.

Monte- Perhaps this framework could accelerate development of a BTLE external? https://github.com/kickingvegas/YmsCoreBluetooth

Nakia
Posts: 425
Joined: Tue Feb 21, 2012 8:57 am

Re: Bluetooth Low Energy

Post by Nakia » Sat Jan 18, 2014 2:07 am

Yeah CAL151 I understand that.
I was actually speaking with Monte early last year about the BLE External (Probably maybe one of the first to request it?) as I have been looking at projects with it for a long time now.

Post Reply