Inspiration
We were inspired to create an app that would educate people on how they can make more sustainable choices. We decided that food was a good place to start. Our goal was to make an app that encourages people to make these choices and compete with themselves and each other by tracking the carbon footprint of all of their meals. We also wanted to include some fun facts to show the impact of these choices.
What it does
Our app calculates the carbon footprint of a meal based on what foods are in it at a standard portion size. Currently, we just have it working for meats but it could easily be expanded to other foods and portion sizes as well.
How I built it
We built this app using Swift on Xcode.
Challenges I ran into
Neither of us had ever used Swift before and we also had very limited programming experience to begin with so we spent most of the time trying to figure out how to use it. One of our biggest challenges were creating buttons that had functions but after hours of coding and watching Youtube videos we figured it out. At the end, we had the total CO2 calculating correctly however we couldn't figure out how to make it print the right number on the app because the variables wouldn't hold their values across different pages.
Accomplishments that I'm proud of
I feel like we really went from absolutely no knowledge of Swift to a good understanding of how it works. I thought it was really cool that we were able to make an algorithm calculate a number as we pressed different buttons.
What I learned
I learned how to combine the user interface with functions in the code itself. I also learned how to create buttons, a storyboard, and how to print changing text on the app.
What's next for Meat Calculator
We would like to expand meat calculator to other foods and create a tracking system with charts that show how the user is reducing their carbon footprint throughout the week. Once that is done, we would like to look into expanding it beyond foods to things like modes of transportation.
Built With
- switch
Log in or sign up for Devpost to join the conversation.