• Anna Oh

Week4-5) Long journey to measuring the temperature of ITP

Updated: Mar 8, 2019

Since I failed to read correct temperature for last time, I installed again (already third time to re-install) from the very beginning. I realized using Raspberry Pi is very sensitive, even sometimes I need to reboot without any reasons. So I set up my Pi using Class's instruction.

I got lots of help from Mark (Mark for president!!!👏🏼👏🏼👏🏼👏🏼) and he taught me how to use Git effectively whenever I update my code.

Basically, I use two different Terminal window, the first one as a update my code to Github, the second one as update my code from Github to my Raspberry Pi. Every time I update something, I used command key ' git add .' , git commit -m "message" ' , 'git push', and I use 'git pull' to synchronise at my Raspberry Pi (my pi user name is try3@annapipi.local) First of all, I downloaded Tom's example code to my folder and paste it to my Git and Pi. Accordingly, I install npm.

Finally I could see my temperature sensor read temperature of ITP! 😭

(of course, there were lots of error appered to make sensor read right value..)


Then, I edited example code to send the data to the server.

I created var temp, and created function sendingTom to send my data value to server.

(To check my sensor status, I check my data value from dweet.io instead of tigoe.io)

And I add LED to green light on when temperature is below than 25 celsius , and red light on when temperature is above than 25 celsius. Furthermore, to set the LEDs, I install onoff example to my Git and Raspberry Pi. Since I decided not use use button to control the LEDs, I remove the code line for button.

This is for the setting the LEDs

Eventually, I could see the LED color changing depends on the temperature.

------Enclosure box------

Given that it was to difficult to set up LCD screen with Raspberry Pi, I decided extra enclosure box with different interface compared to previous one. I made the box with cardboard with 3 main interfaces. (Turned out the size is too tight for wiring 🌚)

After adding few command to keep track the temperature value without logging Pi, I could see my enclosure box can read temperature with power plug.

Code here

© 2023 by Salt & Pepper. Proudly created with Wix.com