40
edits
Robinwieber (talk | contribs) |
Robinwieber (talk | contribs) No edit summary |
||
Line 18: | Line 18: | ||
2. After that, I had a plan to follow and my first action was to connect the sensor to the Arduino and the Software Processing. After some small issues, because I used an Analog pin instead of a digital pin to read out the values, I managed to get the temperature and humidity into processing. At first I was confused, because I forgot split the values in Arduino, in order to use it in Processing. After that the foundation of my Project was made. | 2. After that, I had a plan to follow and my first action was to connect the sensor to the Arduino and the Software Processing. After some small issues, because I used an Analog pin instead of a digital pin to read out the values, I managed to get the temperature and humidity into processing. At first I was confused, because I forgot split the values in Arduino, in order to use it in Processing. After that the foundation of my Project was made. | ||
[[How I split the values in Processing]] | |||
<source style="border:none; height:650px; overflow:scroll;" lang="c" line start="55" highlight="4"> | |||
if (port.available() > 0) { | |||
val = port.readStringUntil('\n'); | |||
String trimmedData = trim(val); | |||
String [] list = split(trimmedData, ','); | |||
temp = float(list[0]); | |||
hum = float(list[1]); | |||
</source> | |||
3. I informed myself about the effect of colors to the emotions of the human brain. This was very theoretical but also interesting. I also decided to use my own knowledge and feelings to choose the color layout. I endet up with a color transition from dark blue (cold) to dark red (warm). I tested the layout one week and compared it to a regular thermometer to ensure the functionality in an everyday environment. My projekt worked surprisingly good after an adjustment period of two to three days. | 3. I informed myself about the effect of colors to the emotions of the human brain. This was very theoretical but also interesting. I also decided to use my own knowledge and feelings to choose the color layout. I endet up with a color transition from dark blue (cold) to dark red (warm). I tested the layout one week and compared it to a regular thermometer to ensure the functionality in an everyday environment. My projekt worked surprisingly good after an adjustment period of two to three days. | ||
Line 53: | Line 65: | ||
</source> | </source> | ||
4. After this time of everyday use I decided to work on the visual layout even more to show the recipients that the image gets constantly updated with new value via a little trick. I included a very slightly recognizable working random function inside the value of the humidity to show the recipients visually that there are changing values. I also want to include the same in the color. | |||
Code in processing: | |||
<source style="border:none; height:650px; overflow:scroll;" lang="c" line start="55" highlight="4"> | |||
t2 = map(hum, 10, 100, 400, 800); | |||
r = map(temp, 5, 30, 0, 255); | |||
g = map(temp, 5, 30, 40, 0); | |||
b = map(temp, 5, 30, 255, 0); | |||
int i = 0; | |||
while (i < 9) { | |||
i = i + 1; | |||
int j = 0; | |||
while (j < 9) { | |||
j = j + 1; | |||
posX = i * 100; | |||
posY = j * 100; | |||
squareSize = random(t2); | |||
fill(r, g, b); | |||
circle(width/2, height/2, squareSize); | |||
fill(0, 0, 0); | |||
circle(width/2, height/2, 300); | |||
fill(255, 255, 255); | |||
circle(width/2, height/2, 100); | |||
</source> | |||
Thats the current state of my project. To finish my project I still have to manage a few challenges. My final idea is to use a raspberry pi connected to an Arduino that runs the Arduino Software and Processing. The reason for that is the advantage that the raspberry pi can be connected to a Tablet via bluetooth. This changes an important aspect. The usage and mobility. | Thats the current state of my project. To finish my project I still have to manage a few challenges. My final idea is to use a raspberry pi connected to an Arduino that runs the Arduino Software and Processing. The reason for that is the advantage that the raspberry pi can be connected to a Tablet via bluetooth. This changes an important aspect. The usage and mobility. |
edits