Diwali-iot is a Flask based Internet of Things (IoT) static application that changes the color of the lamp wick based on the color given by the user in the application.
The following technologies are ued to accompalish this project
-
Frontend
- HTML
- CSS
-
Backend
- Flask (Python)
-
Storage
- File System
- JSON
-
Deployment
- Heroku
Slno | Components | Specifications | Quantity |
---|---|---|---|
1 | Wifi Module Based Microcontroller | Node MCU | 1 |
2 | RGB Led | 5V (Common Anode ) | 1 |
3 | Power Source | Battery (9V) | 1 |
4 | Resistors | 1.2 |
3 |
5 | Jumper Wires | Male to Male, Male to Female | As many as required |
Pin Name | Pin Number |
---|---|
Red Pin | D6 (GPIO 12) |
Green Pin | D5 (GPIO 14) |
Blue Pin | D2 (GPIO 4) |
Comman Anode Pin | 3V3 |
git clone https://github.com/SHESHANKSK/diwaliiot.git
cd diwaliiot
pip install mkvirtualenv
mkvirtualenv <name of virtual environment>
workon <name of virtual environment>
pip install -r requirements.txt
flask run
OR
python app.py
main.ino file
Change the name of your wifi and password
const char *wifiName = "wifiname";
const char *wifiPass = "password";
Deploy your flask app and get get the api link and change
const char *host = "write the endpoint where your api is exposed";
Platform Used : Heroku
heroku login
heroku create <name of your app>
git push heroku master
Front-end Design : Coding Artist Web
Deployment: Push Flask Apps To Heroku For Webhosting - Python and Flask #11