Code used for the IoT series ("Fellowship of the Things") episode 2.
Copy the code into the particle.io IDE. Run the calibration code first in order to get the magic "calibration factor" number. Paste that number into the "weight-for-treats" code. Finally, upload that program to the Photon.
Upon sensing 1 lb or greater, the servo will actuate to dispense some treats. While the dog munches on those (after a 2 second delay), the Photon posts the weight to https://data.sparkfun.com/sfe_dogs.
The code is beerware; if you see me (or any other SparkFun employee) at the local, and you've found our code helpful, please buy us a round!
Distributed as-is; no warranty is given.