• Hi friends,

    I am working on some project in which we have to measure the distance between two nearby device using puck.js . if distance is less then a meter . we need to emit LED.

    One device is puck.js and other one is ESP32.
    Help me to figure out this.

  • Assuming the ESP32 is advertising, you should be able to use something like:

    NRF.setScan(function(d) {
      if (d.addr=="...") LED.write(d.rssi>-70);

    You'll need to change the address and probably the RSSI value as well, but that should be a good start :)

  • Thanks its working

  • Just a quick note that doing this does use a lot of power (as the radio is always receiving) so will run the battery down quite quickly - so you might want a way of only enabling it when you need it.

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

Measuring distance between two devices using puck.js

Posted by Avatar for Saurabh @Saurabh