Wednesday, November 11, 2009

Thermometer with Processing

So I continued working on Monday's assignment to create a display in Processing that uses the data output from the Thermistor and after getting through a couple of problems, I finally got it to work. I've posted an image of the application as well as the codes and a link to the site that best aided me.

There are two codes at work here, one for the Arduino and one with Processing.

ARDUINO:
(The image and most of my code for the Arduino side were from the WEBSITE that Katerie posted on the class page, as it was a clean, well-written code)

Once you have the thermistor set up properly with the Arduino, upload the CODE to the board, making sure that the analog in wire is in the corresponding port.

The uploaded code takes the analog value of the thermistor and runs it through an algorithm that outputs the temperature in Fahrenheit. This value is sent in via serial communication to Processing.

PROCESSING

For the Processing script, I ended up writing most of it myself with some bits and pieces from the Arduino WEBSITE. Essentially what the program does is take the temperature reading and outputs an image of a thermometer that changes appropriately based on the value. I also included text that outputs the actual number as well. I have thoroughly commented the CODE, so even those who don't know Processing should be able to understand what each piece of code is doing.



If anyone has questions on how any of the components work, please let me know and I will be happy to assist you.

If you didn't catch the previous links to the code, here they are again:

Arduino Code

Processing Code

No comments:

Post a Comment