This is a project for EE-629. A smart contract that will execute utilizing Chainlink, Ethereum (Kovan network), and Raspberry Pi!
Check out the website at https://sites.google.com/stevens.edu/williambaltus/home.
(The website contains much of the information on the progress and achievement of this project)
This project leverages IoT, Cloud, and Distributed Ledger Technology. It's task is to execute a transaction between two wallets on the Ethereum Kovan test network based on environmental data gathered from a BME680 sensor. The flow of events in this project is the following:
- Collect environmental data via a BME680 sensor and Raspberry Pi
- Push sensor data to Firebase Database via Raspberry Pi
- Load webpage using Flask
- Pull data from Firebase Database
- Publish data on webpage
- When webpage is GET requested, return JSONified data!
- Smart contract with paired LINK node sends GET request to webpage
- Smart contract receives environmental data
- Smart contract compares environmental data to threshold value
- Smart contract transfers funds from one wallet to another
- Google Firebase Database (Cloudstore)
- Heroku account and app created
- Add Firebase environmental variables and credentials to config vars section of Heroku app
- Raspberry Pi
- BME680
- 4 Male to Male jumper cables
- Breadboard
python3 -m venv .env
source .env/bin/activate
-
Install all requirements to run via
pip install -r requirements.txt
-
Next install bme680 requirements via
pip3 install adafruit-circuitpython-bme680
-
Next ensure to change the
.env
file with your particular Firebase credentials.
This project cannot be directly replicated from this repository but a brief tutorial can be found below.
I was unable to set this up properly, I was have issues sending over the .csv file unfortunately.