So in my apartment I have an interesting phenomenon where no matter what the thermostat is set to my room will decided how hot or cold it wants to be. I believe that with how my room is positioned the sun pierces through the physical barrier that is known as blinds and begins to cook everything and anything around it. To test how hot my room becomes on a sunny day I was able to position a temperature sensor and collect data through a short amount of time to see how my room is affected.
Analyzing the Temperature Sensor
To make our temperature sensor work it need to be connected to a particle photon which was labeled, 'Stevens_Photon', as during test my photon, 'TGrata_Photon', was experiencing issues and our friends were kind enough to let us borrow his. The connections for the temperature sensor can be found below in the fritzing diagram. To begin the code we needed some help from a pre-written program and thus the code, 'Onewire.h', was included in order to make things easier when writing the code for the temperature sensor. NOTE: Make sure you use a 'Dallas DS18B20' temperature sensor when using this code as it only works with this model of temperature sensors. Finally a resistor was needed and thankfully a guide of how to hook up a similar temperature sensor can be found on the particle website and it recommended using anything from 4K ohms to 10K ohms. I ended up using a 10K ohms resistor for our circuit. With everything setup the photon was powered on and began taking temperature readings. While the photon did this I made sure to label the event name temperature so make things easier to recognize in case of any confusion. While it took data I then went to IFTT to connect my particle account in order to publish my even data to a spreadsheet. Luckily an applet was already created in order to convert event data to a google doc and with that I had a spreadsheet updating every minute to give me the desired data I was looking for. The graph of the test data can be found below.
Setting up the OLED Display
Using the OLED display we used the photon, 'peters_photon', in order to receive the event 'temperature' data and display it on an OLED display. We ended up using an ADAFRUIT SSD1360 OLED display and when using this type of display be sure to include the follow program in your code from the libraries, 'Adafruit_SSD1306.h'. With this added all you need to do is copy the code below and interchange the photon the even is being subscribed from and you should have a working temperature display just like we did!