puckyActive: Advertise all the Sensors!

Posted on
  • We've enjoyed working with the Puck.js and Espruino and are pleased to share our open source puckyActive code (MIT License) and our Program a Puck.js with puckyActive tutorial.

    The code periodically wakes the Puck.js to read all the on-board sensors (battery, temperature, light, cap sense & magnetometer), then transmits the readings in an advertising packet. Any listening device in range can observe these packets and interpret the sensor readings. The readings are included as Manufacturer Specific Data, with the company code of Code Blue Communications (0x0583), our partner who introduced us to Espruino and Puck.js (thanks @billsalt !).

    We've also written the JavaScript to decode these packets and included it in our advlib library for Node.js. And if you have a Raspberry Pi 3 kicking around, you can follow our Make a Pi Hub tutorial which provides a "sensorscape" which will display all the sensor values in a web page:

    The goal of puckyActive is to provide a versatile and easy-to-use sensor beacon platform for education and culture of which we have a number of upcoming projects we look forward to sharing. Hope you find it as fun and useful as we do!

  • That looks great - thanks for posting all the code up!

    In Espruino 1v95 I actually added the ability to set manufacturer data directly via setAdvertising - so you could actually remove all the low level Bluetooth stuff from initialiseAdvertisingPacket if you wanted to... Although having said that there's a lot to be said for having something that works on the firmware the Pucks come with out of the box :)

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

puckyActive: Advertise all the Sensors!

Posted by Avatar for reelyActive @reelyActive