- Write an application that interfaces with an input and/or output device that you made, comparing as many tool options as possible.
Class material: Interface and Application Programming
For this assignment, I chose to work again with the thermosensor (check exercise13 for extra information). The idea was to read data and plot a graphic with processing application. As I had my code 'serial printing' information in the screen, it took me a while to learn I couldn't busy at the same time Arduino and Processing softwares with the same USB por connection (com3 in my case).
- It has a website: processing.org.
--- Download link
--- Tutorials link
--- References and exemples link
I read about some exemples that were available at the website and chose one. My intention was to plot a graphic in my computer that showed temperature measurement. The idea was to see the temperature change clearly. As the ar conditioning inside the lab was getting inside temperature cold (19°C) the simple 'holding thermosensor' tight made a significantly change in the reading value. That change is to be recognized in the graphic.
The assignment workflow is:
- Learn Arduino to Processing.
- Implement an Arduino code.
- Implement a Processing code that relates to previous Arduino code.
- Check results on screen.
In order to implement this exercise, I searched and customized an online available solution (link below). After I finish the Sparkfun tutorial, I iniciated working on this second code. There is the need to adjust serial comunication in Arduino and Processing codes. Seria read is important because that is the port I used to receive information from themosensor. The frequency this data flows has to match in Arduino and Processing codes. The computer COM port has to be set in order to get in Processing display the correct read. Otherwise, the result will be null or error message. I had all this problems and, one by one was adjusting and seting the code to make it work.
Customize also means colour and time to refresh screendata. There is a condition inside the reading loop that 'cleans' the graphic area reseting the inicial background colour. To get the information and the change in temperature clear in the display - graphic - the data plot colour must contrast with background colour.
Reference link: ITP Physical Computing Lab: Serial Output from an Arduino to Processing.
-----------
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.