ds18s20 Temperature Sensor
Download http://www.pjrc.com/teensy/arduino_libraries/OneWire.zip and copy it to your libs directory. On OSX its the following:
mv OneWire ~/Documents/arduino/libraries/
Next grab the drivers for the light sensor, I am using a TSL2561.
mv Adafruit_Sensor-1.0.2 ~/Documents/arduino/libraries/Adafruit_Sensor
mv Adafruit_TSL2561-1.0.0 ~/Documents/arduino/libraries/Adafruit_TSL2561
You can test these are installed correctly as they will appear in the “Recommended libraries” section in the screenshot above once you restart the Arduino IDE.
The following code is mostly from http://playground.arduino.cc/Learning/OneWire I have a few really minor changes.
The code below is all will read from the two sensors and output JSON over the serial port.