girlcode meets internet of things: connected hula hoop

Post on 12-Apr-2017

699 Views

Category:

Presentations & Public Speaking

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Connected hula hoop

Ingredients

Ingredients● Tubes to make hulas

Ingredients● Tubes to make hulas

● Arduino trinket w/ Bluetooth

module

Ingredients● Tubes to make hulas

● Arduino trinket

● Accelerometer (3df)

Accelerometer

Ingredients● Tubes to make hulas

● Arduino trinket

● Bluetooth module

● Battery pack

Ingredients● Tubes to make hulas

● Arduino trinket

● Bluetooth module

● Battery pack

● Accelerometer (3df)

● Meteor cordova app

Type some code...function onConnect(peripheral) {

deviceId.set(peripheral.id);

if (typeof ble === 'undefined') return;

ble.startNotification(peripheral.id, bluefruit.serviceUUID, bluefruit.rxCharacteristic, onData, onError);

}

Type some code...function onData(data) { // data received from Arduino

var dt = eval(bytesToString(data));

SensorData.insert({

x: dt[0],

y: dt[1],

z: dt[2]

});

}

top related