Skip to content

3 Arduino

Grandson128 edited this page Jun 3, 2021 · 8 revisions

Used Modules

Imported from Arduino IDE:

  • NTPClient.h
  • WiFiUdp.h
  • ArduinoJson.h
  • set
  • string
  • addons/RTDBHelper.h

Credentials

FireBase

//Host
#define DATABASE_URL "https://indoor-location-se-4383a-default-rtdb.europe-west1.firebasedatabase.app" 
//Auth
#define DATABASE_SECRET "tzXOapDFPzel9sQdUBEvXAxtgbLUiYf2LGnKY9xb"

Local Wifi

//Local wifi with internet access 
#define mySSID "" 
#define myPASSWORD ""

Usage

To use the Arduino as a beacon it's just necessary to upload the code in the arduino/indoor_location folder to the Arduino Wemos using the Arduino IDE.

Right now the Arduino will be listening for incoming packets and calculate RSSI for the one coming from the Raspberry Pi. After calculating the RSSI a JSON like bellow will be sent to FireBase db.

{
  "beacon": {
    "1": {      //beacon Identifier
      "signal": {
        "datetime": "2021-6-1 17-2-1",
        "objectIdentifier": "d0:37:45:8b:33:bc",
        "rssi": -81
      }
    }
  }
}

Clone this wiki locally