Inspiration

My inspiration for the project was seeing how much humans are impacting our environment negatively, with over 36.6 billion tons of greenhouse gases going into our atmosphere because of our choices. It devastated me to see how much of this we could prevent by just making better choices and changing our daily routine, like using a car to drive to work every day.

What it does

This system will ask the user to ask a few questions and calculate their carbon footprint score. Once it calculates their score, it will tell them what their score is and if they have a high or low carbon footprint. Finally, if the carbon footprint score is too high, it will advise you on how to maintain your environmental impact.

How I built it

I built it using Java. With Java, I used Scanners to ask for user input and take in the input to calculate the score using specific criteria that I researched. After I add the score up, I check if the score is above or below the threshold. If it is below, it would print that they had been doing a great job, but if it was higher, it would print some advice given by OpenAI. I implemented AI in my code by purchasing an API key from OpenAI and implementing it into my code.

Challenges I ran into

The main challenge I ran into was implementing the API key since I did not know how to do this. However, I used tutorials and managed to get it working. I also had some struggles printing out the response from the AI because it was printing the same response every time I ran the code. Additionally, since I was working alone, I had to face these issues on my own, and couldn't add extra details, like graphics into my code.

Accomplishments that I am proud of

I am proud of learning how to integrate with APIs provided by OpenAI and implementing the AI responses into my own code in Java. I found the recommendations generated by OpenAI very inspiring. Overall, I am proud of using a new method to solve my issues.

What I learned

I learned how to use OpenAI to enhance my code by calling API in Java code and using API keys. This was something I did not even know was possible up until now.

What's next for AI Powered Carbon Footprint Calculator

I want people to know how only one human can be such a threat to the environment and show the world what they can do to help. With this program, I plan on helping people help themselves to help make this environment a better place by giving them advice and encouraging them to keep this world clean and healthy.

Built With

Share this project:

Updates