Testing Puck.js on the nRF52 Dev Kit

Posted on
  • Very excited to get started with my 2 Puck.js's this December! To keep me busy until then, I've built the latest Espruino and flashed it onto my NRF52832 dev board this evening to try writing a BLE peripheral in Javascript.

    However I'm not able to find much documentation on controlling the BLE functionality of the chip, and some NRF methods documented on the Espruino site are undefined in my build (for example NRF.setName())

    Is there a build which better demonstrates Espruino on the nRF52? And will the BLE api and documentation be available before the Puck.js is delivered this Winter? My apologies if documentation already exists, I'm just anxious to write some async lowpower devices :D

    Cheers

  • Great! Glad you got it working!

    Yes, the API has changed a bit in recent versions. setName is now rolled into setAdvertising since you can't set the name without resetting the advertising info.

    You should be able to build your own up to date docs by calling scripts/build_doc.py (I think), or you can look in the source files directly. All the documentation is stored in comments that start with /*JSON;

    https://github.com/espruino/Espruino/blob/master/libs/bluetooth/jswrap_bluetooth.c
    https://github.com/espruino/Espruino/blob/master/libs/puckjs/jswrap_puck.c

    (The Puck.js specific stuff might not work on nRF52, since it's expecting an IR LED and Magnetometer)

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

Testing Puck.js on the nRF52 Dev Kit

Posted by Avatar for user67077 @user67077

Actions