IoT node that sends detect RFID tags serial-number and send it to Cloud Firestore
This project is created PlatformIO IDE using the esp-idf framework, the project also uses 2 external esp-idf components which are found as submodules under the components directory.
To get started:
- Install PlatformIO Extension for vscode
- Create a new project using ESP-IDF framework
- Under the root of the project create a new directory called components
- Clone this repo with its submodules
$ git clone https://github.com/kaizoku-oh/firestore-rfid-node.git
$ cd firestore-rfid-node
$ git submodule update --init
- To avoid exposing sensitive data in the code we'll store them in environment variables that'll be when building the project.
# Set local environment variables
> $env:WIFI_SSID = '"TYPE_YOUR_WIFI_SSID_HERE"'
> $env:WIFI_PASS = '"TYPE_YOUR_WIFI_PASSWORD_HERE"'
> $env:FIRESTORE_FIREBASE_PROJECT_ID = '"TYPE_YOUR_FIREBASE_PROJECT_ID_HERE"'
> $env:FIRESTORE_FIREBASE_API_KEY = '"TYPE_YOUR_FIREBASE_API_KEY_HERE"'
# OPTIONAL: To read and verify the values of the variables that you just set:
> Get-ChildItem Env:WIFI_SSID
> Get-ChildItem Env:WIFI_PASS
> Get-ChildItem Env:FIRESTORE_FIREBASE_PROJECT_ID
> Get-ChildItem Env:FIRESTORE_FIREBASE_API_KEY
# Set local environment variables
$ export WIFI_SSID='"TYPE_YOUR_WIFI_SSID_HERE"'
$ export WIFI_PASS='"TYPE_YOUR_WIFI_PASS_HERE"'
$ export FIRESTORE_FIREBASE_PROJECT_ID='"TYPE_YOUR_FIREBASE_PROJECT_ID_HERE"'
$ export FIRESTORE_FIREBASE_API_KEY='"TYPE_YOUR_FIREBASE_PROJECT_ID_HERE"'
# OPTIONAL: To read and verify the values of the variables that you just set:
$ echo $WIFI_SSID
$ echo $WIFI_PASS
$ echo $FIRESTORE_FIREBASE_PROJECT_ID
$ echo $FIRESTORE_FIREBASE_API_KEY