• Hi! As @tbd says there is a standard for this, which Puck.js doesn't implement yet.

    However that doesn't mean you can't do it yourself - you can use advertising packets.

    You can set each Puck to use NRF.findDevices(...) every so often, which will look for the advertising packets of other Pucks. You can then scan through those and aggregate all the data you see, and can use NRF.setAdvertising to then update the Puck's own advertising packet to reflect that data. After a while, all the up to date data will trickle through the system.

    How often/how long you scan for is a trade-off on battery life, but 1 second every minute should still be pretty good and should make it last for a while.

    At the Raspberry Pi Zero W end you've got Bluetooth LE already, so all you need to do is read the advertising packets it receives and you're sorted.

    You might need a little thought on how to make sure you always have the most up to date info on the Pucks (each Puck that generates data might want a 'version' byte?). But honestly if you're doing this for a Uni project it gives you an interesting problem/solution to write about :)

About

Avatar for Gordon @Gordon started