• Hi Everyone,

    I am knew here so go easy on me!

    Question of the day. I am looking to use 100's of the Puck JS as separate Beacons, but I want to be able to control how it transmits it's advertising package (if that is the right word?)

    I want it so instead of the Beacon just sending out short URL's etc non stop, that by using a sensor, (the one I have in mind is the APDS-9960 Proximity Sensor) that when one of the sensors is activated and "only" when its been activated does the Beacon wake up and send out the relevant information that can then be seen by mobile phones within the range of the BLE in the Beacon.

    I hope this makes sense, any tips, ideas, suggestion feedback very welcome.

    Many thanks


  • As a follow up please see below the data sheet for the APDS-9960 sensor I am thinking of using with the Puck JS. Not sure this is of much help, but it maybe useful to someone!


  • Hi,

    Yes, that's totally possible. There's no Espruino library for the APDS-9660 sensor though, so you'd have to make one - however it shouldn't be too painful to do and we can try and help you out...

    There's a Tessel library for it here, but it drags in some other libraries that could be tricky on Espruino. It'd be a good place to start from though.

    One thing to look out for though is power usage - looking at the datasheet you linked, the board draws 0.2mA in its normal working mode... That'd run the CR2032 battery down in a little over a month. However you might be able to put it into a lower power mode, where it checks for interactions less often.

  • Hi Gordon,

    Many thanks for the reply. Yes I can add another power supply not a problem, as it will ALL go into a 3D Smart Phone Replica, that is around 22 Inch height and 2 inches (maybe less) thickness.

    I would not even know how to go about making a Espruino library, that is just way way out of my reach or brain cells. I have only just worked out how to make 16x16 Neaopixel display scroll a text message in any colour, that took me 10 days.

    You will have t0 be patient, I am not like you guys that eat code for breakfast, I am going on 60 and when I was at Uni mobile phones had not even been invented or Google or even Microsoft, guess I am old.



  • I forgot to say that the budget to make the "Beacon PaD" as we are calling it (My wife's idea) is not a problem, as we will be renting them out and also selling them. So if John Smith in Leeds wants to buy a Beacon PaD for what ever price we decided (Around $500) Then he can and off he/she goes with a Mini Portable Billboard called the Beacon PaD, that he can very easily put in the back of his car etc and then offer the opportunity for ANYONE/ANY COMPANY to use the Beacon PaD as a Beacon Advertising Media, for a week a month etc. One customer spending $100 a month advertising, which is very low, earns him $1200 a year, he has paid for the Beacon PaD in just a few months and now its all 100% profit, that is our idea behind it all.

  • It's this one: https://github.com/jiahuang/apds-gesture­

    So someone's made some code to interface to it, but it's not meant for Espruino so would need some modification.

    I can definitely look at getting a module for that APDS-9960 sensor done - if I have one here it shouldn't take too long to get working.

    However it seems that for now you could come up with a proof of concept using just the Puck's button?

    One thing to be careful about is phones can take ~30 seconds or so to register a broadcast URL - so even if someone swipes, there won't be an instant response on their phone.

  • Hi Gordon,

    Could something similar to the video link below be used with the Puck JS to trigger the Puck JS to "start" transmitting as a beacon? - Thanks Jonathan


  • Yes - in that case you have a transmitter and a receiver, and the hand is just cutting the path of the light between the two.

    A kit like this would have all the parts you'd need for something like that, plus a few!


  • Thanks, does that mean that for all the other Beacon companies out there that for ANY Beacon it can take 30 seconds or so to register a broadcast URL and be seen on the phone? Is there anyway of making the phone pick up the Beacons URL its broadcasting quicker?

  • does that mean that for all the other Beacon companies out there that for ANY Beacon it can take 30 seconds or so to register a broadcast URL and be seen on the phone?

    Pretty much, yes. The Bluetooth signals Puck.js makes can be the same as from any other BLE beacon, and have the same effect.

    You'd have to read around it elsewhere and do some tests - it can be faster, but when I've been testing you can't really rely on it, especially it network coverage is a bit patchy.

  • OK many thanks for the feedback - Cheers

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

Puck JS - Triggering Beacon Using APDS-9960 Proximity Sensor

Posted by Avatar for Jonathan_Mallinson @Jonathan_Mallinson