List the BLE advertisement data of multiple points.

Make things

Using two obniz in multiple locations, the list of BLE devices at each location is listed at random.


How to make


No parts are connected to the obniz Board.
Connect to power and wifi and leave it where you want it.

At this time, there is also no need for two obniz boards to be nearby. You can place it at a distance such as your home and office.


In order to use the BLE, you need to initialize it first. The initialization code is as follows.

(In the final program, the obniz part was changed to obnizA and obnizB, respectively.)

await obniz.ble.initWait();

To search for BLE devices around you, use the following code

You can change the search conditions by specifying the parameters in {}.

obniz.ble.scan.start({duration: 30});

You can read more information about BLE here.

When you run the program, you can view a list of locationA and locationB devices.