Wireless outside weather station using particle photon, arduino and nodejs
The particle photon is a pretty awesome little arduino device with onboard wifi. When I got my set Photons I decided to extend my Raspberry Pi Arduino Weather station with some outside temperature readings using the sensor that was packaged with the Particle maker kit I got. I wanted to mount the sensor out the window of my shed and have the sensor connect to the wifi to transmit its data.
Setting up the Particle was done through the app on the phone, there is good getting started documentation on that available. Through the build.particle.io web interface I loaded the following arduino/particle snippet that exposes the current outside temperature on a double variable temperature that will be retrievable through the Particle API later. The temperature value is read using the OneWire spark library that works pretty well with the “sealed, water proof version of the DS18B20” from the maker kit.
I put the photon and wiring in the plastic case, plugged in a usb charger in the shed and fed the temperature through the windows of the shed:
The particle photon is now sending it’s temperature data to the particle cloud, and I can access these from my nodejs weather script on the raspberrypi using the PARTICLE_DEVICE_ID and PARTICLE_ACCESS_TOKEN from the Particle cloud api as follows:
For some reason, there are sometimes some strange celsius values popping up, which I’ve excluded using some simple checks. To keep the data management easy, I’m writing the temperature values to a simple text file, and retrieve the data in the webinterface the same way I did on the previous version of the raspweather node API. The weather graph now shows both outside and inside temperature: