Arduino Multi-Sensor Package  1.0.0
Macros | Functions | Variables
/home/bephillips2/Packages/arduino_multi_sensor/multi_sensor.cpp File Reference
#include <Wire.h>
#include <SFE_BMP180.h>
#include "RTClib.h"
#include <SPI.h>

Macros

#define LOG_INTERVAL   1000
 
#define SYNC_INTERVAL   1000
 
#define redLEDpin   3
 
#define greenLEDpin   2
 
#define photocellPin   0
 
#define tempPin   1
 
#define BANDGAPREF   14
 
#define aref_voltage   3.3
 
#define bandgap_voltage   1.1
 

Functions

byte read_data ()
 Read data from the DTH11 Sensor. More...
 
String DTH11Loop ()
 Read Humidity data from the DTH11 Sensor. More...
 
String BaroRead (SFE_BMP180 &pressure_sensor)
 Read data from the SFE BMP180 Barometric Pressure Sensors. More...
 
String TimeRead (RTC_DS1307 &rtc_clock)
 Read the current from the Real Time Clock. More...
 
String LightSensorRead (int light_sensor_pin)
 Read data from and analog light sensor. More...
 
String TemperatureRead (int temp_sensor_pin, float ref_voltage)
 Read data from analog three pin temperature sensor. More...
 
void setup (void)
 
void loop ()
 

Variables

SFE_BMP180 pressure
 
uint32_t syncTime = 0
 
RTC_DS1307 RTC
 
const int chipSelect = 10
 
int avail = 0
 
char t_str [] = "GET"
 
char buff [64]
 
int DHpin = 8
 
byte dat [5]
 

Function Documentation

String BaroRead ( SFE_BMP180 &  pressure_sensor)
inline

Read data from the SFE BMP180 Barometric Pressure Sensors.

Parameters
pressure_sensorThe pressure sensors class that is currently active
Returns
Barometric pressure in millibar
String DTH11Loop ( )
inline

Read Humidity data from the DTH11 Sensor.

Returns
Humidity data in percentage (%)

Here is the call graph for this function:

String LightSensorRead ( int  light_sensor_pin)
inline

Read data from and analog light sensor.

Parameters
light_sensor_pinPin that the light sensor is currently attached to
Returns
Light sensor reading in arbitrary units
byte read_data ( )
inline

Read data from the DTH11 Sensor.

Returns
String TemperatureRead ( int  temp_sensor_pin,
float  ref_voltage 
)
inline

Read data from analog three pin temperature sensor.

Parameters
temp_sensor_pinPin that the temperature sensor is currently attached to
ref_voltageExternal reference voltage used to calibrate sensor
Returns
Temperature sensor reading in degree Farenheit

Here is the call graph for this function:

String TimeRead ( RTC_DS1307 &  rtc_clock)
inline

Read the current from the Real Time Clock.

Parameters
rtc_clockReal Time Clock class that is currently active
Returns
The current time in the following format Year/Month/Day Hour:Minute:Second