-56-
v6.3
Sensors
7. Sensors
7.1. Sensors in Waspmote
7.1.1. Temperature
The Waspmote RTC (
DS3231SN from Maxim
) has a built in internal temperature sensor which it uses to
recalibrate itself.
Waspmote can access the value of this sensor through the I2C bus.
Figure: Temperature sensor in the RTC
Obtaining the temperature:
{
RTC.getTemperature();
}
The sensor is shown in a 10-bit two’s complement format. It has a resolution of
0.25º C
. The measurable temperature range is
between
-40ºC
and
+85ºC
.
As previously specified, the sensor is prepared to measure the temperature of the board itself and can thereby compensate for
oscillations in the quartz crystal it uses as a clock. As it is a sensor built in to the RTC, for any application that requires a probe
temperature sensor, this must be integrated from the micro’s analog and digital inputs, as has been done in the case of the
sensor boards designed by Libelium.
More information about the RTC can be found in the “Hardware” and “Energy System” chapters.
Related API libraries:
WaspRTC.h, WaspRTC.cpp
All information about their programming and operation can be found in the document:
RTC Programming Guide.
All the documentation is located in the
in the Libelium website.