29
RubyMotion with hardware Connecting

Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014

RubyMotionwith hardware

Connecting

Page 2: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014

HiI’m @MarkVillacampa

Page 3: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014

WARNINGSPANIARD

Page 4: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014

Using RubyMotion since mid 2012

Page 5: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014
Page 6: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014
Page 7: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014
Page 8: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014
Page 9: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014

Technologies

Bluetooth

WifiJack

Lightning

Long Range

Short Range

Difficult

Easy

Page 10: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014

http://web.eecs.umich.edu/~prabal/projects/hijack/

Project Hijack

Page 11: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014
Page 12: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014

MFI

•Revenue share with Apple

•Strict quality controls

•Licensing fees

•Proprietary chips for authentication

Page 13: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014

External Accessory Kit

EAAccessory

EASession

EAAccessoryDelegate

Page 14: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014

Redpark

Lightning Serial Cable

www.redpark.com

Page 15: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014

Bonjour

The thousand names technology: !

Zeroconf, Rendezvous, mDNSResponder...

NSNetService

NSNetServiceBrowser

Page 16: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014

www.spark.io

Based on TI3300

Spark Core

Page 17: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014

Bluetooth LECoreBluetooth

CBCentralManager → discovers and connects to devices

CBPeripheral → the device you connect to

CBPeripheralManager → turns your iOS device into a peripheral

CBCentral → another device that connects to your device

Page 18: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014

CoreBluetooth

CBService → features that the device has

CBCharacteristic → a value you can get or set on the device

Page 19: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014

iBeacons

Just Bluetooth LE devices

Page 20: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014

Apple Notification Center Service (ANCS)

Read notifications from the iOS device

The Pebble smartwatch uses this to display notifications

Page 21: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014

WWDC

Page 22: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014

HM-10

Based on TI CC2541

Bluetooth LE

Bluetooth UART RS232 Converter

Page 23: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014

https://github.com/kyab/mruby-arduino

Ruby on Arduino!!11!1!!

Page 24: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014

Where to buy some toys!

!

USA:

www.adafruit.com

www.sparkfun.com

!

China (worldwide shipping):

www.seeedstudio.com

Page 25: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014

www.kickstarter.com

Page 26: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014

MotionBluetoothDSL to work with Bluetooth LE devices

Page 27: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014

(Also Blackberry and MS-DOS Phone)

Page 28: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014

DEMO

Page 29: Connecting RubyMotion with Hardware - Rubymotion #Inspect 2014