Introduction: CARBON EMISSION TRACKER

About: Electronics Enthusiast , Computer Engineering Student who like to thinker on electronics and embedded systems and IoT.

This is a simple carbon emission tracker build using esp8266 and some DIP switches, it collect data from the user regarding the type of vehicle , fuel and driving pattern of the user and then decides upon the carbon emission level and then updates to a centralized dashboard

Supplies

  1. ESP8266 ( any other Arduino compatible micro controller with WiFi )
  2. 4 DIP SWITCHES

Step 1: SETTING UP THE ARDUINO

connect one end of the DIP switches to the 5v of the esp8266 and the other end as mentioned below

  1. DIP SWITCH 1 -> D1
  2. DIP SWITCH 2 -> D2
  3. DIP SWITCH 3 -> D5
  4. DIP SWITCH 3 -> D6

Now flash the firmware for the Arduino using Arduino IDE , Arduino code can be fount in this GitHub repo or can be downloaded from below


Open the code in Arduino IDE and flash into the esp8266 and edit the section with the wifi ssid and password to your wifi and the ip of the remote server or the url of the cloud server should be added in the code before flashing


connect a laptop or a mobile phone and use some software to read serial data and get the question and use the DIP switches to get the output

Step 2: Setting Up the Webpage

Clone the github repo - repo_link

install python3.12 - python_3.12

make a account in MongoDB and get connection string - mongo , tutorial

run this command to install all the modules - pip install -r requirements.txt


now start the server by - python app.py


detailed instructions can also be found on the GitHub repo


Step 3: THE PROJECT IS COMPLETE

Due to the in-availability of all the sensors have made me use switches for the control of the input data. More features can be easily added to the project