A Cooking Machine – Assembly 2
This post is the twelfth in a series detailing the processes behind the research, design, material selection, online audience building, fundraising, application development, assembly, and programming of a cooking machine. See the column Stories of Food & Tech here.
Learning how to use different electronics and testing them are both the most time-consuming and exciting experiences of an engineering project. In this post, I want to share the progress I made in programming a TFT Touch screen to work with the stirrer motor for the cooking machine.
TFT Touch Screen
Working through both the hardware and software issues of the TFT touch screen has been both a challenging and satisfying experience for me. I remember browsing through the website before I purchased all three components (the Arduino Mega, the touch screen shield, and the 3.2” touch screen) to ensure I didn’t buy the wrong items. However, when I first plugged them all together, nothing seemed to show up on the screen.
“This is interesting,” I said to myself as I uploaded the sample test programs and libraries onto the Arduino with the touch screen and saw nothing but the backlight. “It’s time to google for answers again; hopefully, this has nothing to do with hardware issues.”
After searching through multiple posts on Google, I realized that my touchscreen Arduino did not have the proper firmware installed on top of it. As a result, I bought a new one with firmware installed and resolved that issue. Check out the video below to see the initial test program.
For the next step, I needed to find libraries for programming the touchscreen. The goal was to visualize the user controls the cooking machine directly on the touchscreen and see the status of various components on the cooking machine.
I uploaded my program onto the TFT touchscreen and was able to see the main page showing in Image 1 below, which offered users two buttons as options: “RPI Camera” and “Controls.” At this point, while clicking on one of the buttons should have led me to a new page with their corresponding functions, nothing actually happened.
Initially, I thought the TFT touchscreen was broken and wondered if I should buy a new one. To confirm this theory, I tried using a separate program to recalibrate the touchscreen (shown in Image 2 below). Unfortunately, it didn’t resolve the issue. Nonetheless, the screen occasionally responded to my touches, proving that the TFT touchscreen was not broken. After a few days of testing and trying various methods, I found out that this non-responsiveness was because my computer didn’t provide enough power to my TFT touch screen through the Arduino board.
Eventually, after several tries , I pressed my fingers gently on the screen, and screamed, “It’s working!”. I pressed my fingers onto various controls on the touchscreen and saw the touchscreen responsive to most of my touches. I couldn’t help but burst into joyous laughter.
The final step was to program the TFT touchscreen with various UI and controls, install an RPI camera for livestream data, and connect my electronics. This is the step that took the longest time because I needed to insert many different functions into my code and understand the logic between switching touchscreen pages and reading/sending control signals from/to the TFT touchscreen. Unfortunately, I can still not successfully view the RPI camera on my laptop. However, for this post, I did successfully manage to connect the motor to the touchscreen. As such, all preliminary touchscreen features are already written in the program, which you’ll be able to see in this video below.
Software Application
Before ending, I wanted to touch briefly on my new ideas for an updated software application. I want there to be a change in my software application, specifically to the food the recipes I will be cooking, which might lead to application design changes. You might be wondering why?
Two weeks ago, I watched a few documentaries on animal agriculture, such as Cowspiracy: The Sustainability Secret and What the Health, and learned more about the harsh truth that we have used a large amount of natural resources (water, nutrients, etc.) to produce meat/dairy and egg products. The process of generating these products significantly pollute our lands and oceans, causing over 90% of the ocean diversity to disappear and consuming over half of the wildlife on land [i]. This process also drives our human survival closer to the edge of extinction every day. Furthermore, non-vegan products that we consume can also have negative impacts on our health, causing earlier symptoms of cancer and diabetes to appear in people’s lives.
I looked at my previous application post/development plan and realized that so far, my cooking machine recipes consist primarily of meat-based dishes. In the spirit of reducing our environmental impact, I now want to switch to cooking and eating vegan food only. For me, this is challenging as I don’t know too many vegan recipes. As a result, I’ll continue my software application development as before, except I’ll try to make some recipe changes. I’ll show you this application in the next post. Stay tuned!
[i] Cowspiracy: The Sustainability Secret, Directed by Kip Andersen and Keegan Kuhn, Universal Pictures, 15 September. 2015. Netflix, https://www.netflix.com/title/80033772.