I'm finding out about BLE more and more each week. I didn't realize RPi was BLE or Arduino MKR WIFI 1010 was BLE.
Updating the firmware on the Arduino MKR WIFI 1010, gave me a new platform to play with the RSL10.
I have a feature for the project where one BLE device recognizes another when in proximity. The BLE device will periodically scan for other BLE devices in the area and act on the result.
Here's some modified code from the Arduino BLE examples.
if (peripheral) { // discovered a peripheral Serial.println("Discovered a peripheral"); Serial.println("-----------------------"); // print address Serial.print("Address: "); Serial.println(peripheral.address()); if (peripheral.address()=="60:c0:bf:29:ea:57"){ //address of the RSL10 Serial.println("LED on"); digitalWrite(ledPin, HIGH); // stop scanning BLE.stopScan(); explorerPeripheral(peripheral); //get RSL10 data }
If the BLE device recognizes the address of a "friend" device, then it reads the data from the new friend and responds to the server.
The arduino can activate GPIO for food/enter/egress/etc when a known friend enters the area.