A library for easier setup and prototyping of IoT devices (pucks), by collecting everything that is common for all pucks in one place.

Dependencies:   BLE_API nRF51822

Dependents:   ir-puck display-puck ir-puck2 BLE_ScoringDevice ... more

/media/uploads/stiaje/header.jpg

Introduction

Raspberry Pi took the maker community by storm when it launched in 2012. With its internet access it allowed small projects to be internet-of-things enabled. We have created a platform to take this one step further.

Our platform, called the Puck platform, is an internet of things platform for mbed. mbed makes it easy to program embedded hardware for people new to embedded systems. Our platform is built upon the first mbed chip with Bluetooth, the nRF51822 created by Nordic Semiconductor. We hope to create a community around these BLE devices where people contribute to the project, and share their designs with each other. Everything is open-source, of course, with lots of supporting materials.

We make it easy to rapidly prototype and develop Bluetooth LE enabled devices - get up and running in under 10 lines of code.

Tutorials and in-depth documentation is available at the project's GitHub page

Pucks

We've developed a handful of awesome examples to demonstrate the platform. These examples are named 'Pucks'. By talking to the internet through your smartphone, the barrier to creating your own Internet of Things device is lower than ever.

Files at this revision

API Documentation at this revision

Comitter:
stiaje
Date:
Thu Jul 17 08:46:50 2014 +0000
Parent:
0:718051934fdb
Child:
2:38614fd0fcce
Commit message:
Make all pucks connectable

Changed in this revision

Puck.cpp Show annotated file Show diff for this revision Revisions of this file
Puck.hpp Show annotated file Show diff for this revision Revisions of this file
--- a/Puck.cpp	Tue Jul 15 14:33:09 2014 +0000
+++ b/Puck.cpp	Thu Jul 17 08:46:50 2014 +0000
@@ -1,7 +1,7 @@
 #include "mbed.h"
 #include "Puck.hpp"
 
-Puck::Puck(bool connectable, uint16_t minor) : _connectable(connectable) {
+Puck::Puck(uint16_t minor) {
     /*
      * The Beacon payload (encapsulated within the MSD advertising data structure)
      * has the following composition:
@@ -34,11 +34,7 @@
     _ble.accumulateAdvertisingPayload(GapAdvertisingData::MANUFACTURER_SPECIFIC_DATA,
                     _beaconPayload, sizeof(_beaconPayload));
     
-    if (_connectable) {
-        _ble.setAdvertisingType(GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED);
-    } else {
-        _ble.setAdvertisingType(GapAdvertisingParams::ADV_NON_CONNECTABLE_UNDIRECTED);
-    }
+    _ble.setAdvertisingType(GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED);
     
     _ble.setAdvertisingInterval(160); /* 100ms; in multiples of 0.625ms. */
 
--- a/Puck.hpp	Tue Jul 15 14:33:09 2014 +0000
+++ b/Puck.hpp	Thu Jul 17 08:46:50 2014 +0000
@@ -10,12 +10,10 @@
         
         uint8_t _beaconPayload[25];
         
-        bool _connectable;
-        
     public:
         /** Initialize the Puck library
          */
-        Puck(bool connectable, uint16_t minor);
+        Puck(uint16_t minor);
         
         /** The BLE Device 
           * @return ble device