Sending DS1820 1-Wire Temperature Sensor Data to Pachube with Flyport WiFi

Posted by openPicus | On: Mar 12 2012

Here’s a new project from openPICUS Community, from Michaelp. This application interfaces via 1wire protocol to the temperature sensor DS1820 and sends data to the cloud service Pachube, thanks to Flyport WiFi.

The DS18S20 digital thermometer provides 9-bit Celsius temperature measurements and has an alarm function with nonvolatile user-programmable upper and lower trigger points. The DS18S20 communicates over a 1-Wire bus that by definition requires only one data line (and ground) for communication with a central microprocessor.

For this application, there is no need for an external pull-up since the pull-up of the port pin is activated.

The port pin can be easily reconfigured in the header file 1wire.h:
#define DQ_PORT I1 // defines the port used for the data line of the DS1820 sensor

Two different temperature calculation modes can be activated by defining the corresponding #define:
#define DS1820_9bit // defines 9bit mode documented in DS1820 data-sheet
#define DS1820_higher_resolution // defines higher resolution mode described in data-sheet

The pachube implementation is just a copy&paste of the Temperature & Humidity Pachube Project by adonatelli.

Download the project from openpicus project page (the 9th one)


  1. Charudatt says:

    Good one. Thanks.

Leave a comment