Week 12: Interface and application programming


Group assignment: compare as many tool options as possible
Individual assignment: write an application that interfaces with an input /or output device that you made



Processing


In the week10 I did a board for the pir sensor, so i decided to detect the movement with and interface created with processing. I installed the software and I searched some tutorial, like this. On Processing's site there is a reference page where there are all the commands which you can use. So I started to sketch something. How you can see size defines the dimension of the display window width and height in units of pixelsis, fill sets the color and rect draws a rectangle to the screen.


Here I changed the position of the rectangle.



And here the colour

I also made other sketches to try more tools on processing, here I used the background function (in this case I made it white) in the setup section. In void draw I made an ellipse and setting the coordinates it's possible to change the shape (in this case even if the function is called ellipse I will use it to make a circle). To see better click on the image

here I have increased the size of the circle


The drawTarget() function makes it easy to draw many distinct targets. Each call to drawTarget() specifies the position, size, and number of rings for each target. Integers and floats are two different kinds of numerical data. An integer (more commonly called an int) is a number without a decimal point. A float is a floating-point number, which means it is a number that has a decimal place. Floats are used when more precision is needed.



I used different processing features and I have to say that I like this software, I would like to use it again in the future. Now is time to make the sketch that will read the signal from the serial port. I found very usefull this documentation because it's the same project. The interface is very simple: a window with a circle that changes color when the sensor perceives a movement (1)




I also changed the name of the port (I have windows 10 on my pc so I went on device manager to see which one was), the shape of the figure (a circle) and the delay of the detection.








Final result




I also used Processing to create an interface to monitor humidity and temperature parameters for my final project