Assignment: Write an application that interfaces with an input and/or output device that you made.
Comparing as many tool options as possible.
Software Used:
Processing
Openframeworks
For this week assignment we were introduced to the User interface and Application writing world.
We should start with:
Pick up a Language
How we are talking to the device through an Interface
What kind of graphics will we use
Optional multimedia for sounds and video
Often there is need for mathematical manipulations of data
Processing:
I picked processing because it is a simple user IDE very similar to the Arduino one.
Since I made a Temperature sensor I thought it would be fun to use it as a Input.
I used a Tree Graphics and adapted the code to be able to create a interface between the tree and the Board.
As the temperature rises the Tree blossoms
We first import the serial Library to the processing program, we have to study the code from Neil and import the most important variables to our Processing code, in my case this were the ones:
In the Python Files we can see the variables byte2, byte3 etc. and in the while loop they are assigned to each other so we are able to read it.
The final byte, byte4, is assigned to Serial read so we can get the values from the sensor board
Having this information now we pass to Processing and we create variables according to this.
3 variables with the values low, mid and high. A float for the values that we get from the sensor. 4 variables, one per byte. Variables for values "up_low", "up_high", "down_high". They must be initialized as zero!
In the void setup we are asking Processing to find our serial port where is connected our FTDI cable.
In the end this was the result from my Input+Processing exercise:
It is very interesting how you can do a couple of nice Interfaces from the physical world to the digital.