This is another simple temperature monitor. It uses a DS18B20 sensor which is connected to the RFduino over a 1-Wire bus. It also adds red and blue LEDs that supply status.
The red LED blinks unless an error is detected at which time it turns on solid. The blue LED turns on when a connection is made to the temperature monitor and blinks 5 times if a new temperature is detected.
Below is a mock up of the breadboard temperature monitor and a circuit diagram produced using the fritzing package.
If you don’t already have the OneWire library information on it can be found here on the Arduino site which directs you to Paul Stofffregen’s site. To install download the zip file and then copy to your RFduino libraries directory. On my system this directory is located at C:\Program Files (x86)\arduino-1.5.7\hardware\arduino\RFduino\libraries. On your system this will be dependent on where your Arduino IDE with RFduino support is located.
The LEDs are controlled by setting that are located in the RFduinoBLE_onConnect and RFduinoBLE_onDisconnect routines. These routines are called when a connection is established to the RFduino and when that connection is terminated.