Things used in this project

Hardware components:
Photon new
Particle Photon
Since we had three remote temperature monitoring setups, we have three times as many materials.
10988 01
Temperature Sensor
We used the DS18B20 uncovered and covered temperature sensors to make this project.
Mfr 25frf52 1k sml
Resistor 1k ohm
4.7K ohm resistors are an option as well, we just noticed more issues with receiving proper temperature measurements when using them.
11026 02
Jumper wires (generic)
Software apps and online services:


DS18B20 Temperature Sensor to Ubidots codeC/C++
This is a basic code using the build app. We include the HTTPClient, OneWire and Spark-dallas-temperature libraries to read our DS18B20 temperature sensor. In order to get data to Ubidots, you need to find and include the VARIABLE_ID and TOKEN and insert into the code on lines 19 and 20 respectively. The only problem we ran into was that the spark-dallas-temperature library included in particle build was not updated. Line 27 in the spark-dallas-temperature.h file was changed to #include <OneWire.h> and added next to our original code.
// This #include statement was automatically added by the Particle IDE.
#include "spark-dallas-temperature.h"

// This #include statement was automatically added by the Spark IDE.
#include "HttpClient/HttpClient.h"
// This #include statement was automatically added by the Spark IDE.
#include "OneWire.h"
#define ONE_WIRE_BUS D2
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensor(&oneWire);
float temperaturef = 0.0; 
float temperature = 0.0;
char resultstr[64];
HttpClient http;
#define VARIABLE_ID "58ecf2787625422c3a418de6"
#define TOKEN "TASZcmIv4eg1oS180p4kKHs31Zy81q"
http_header_t headers[] = {
      { "Content-Type", "application/json" },
      { "X-Auth-Token" , TOKEN },
    { NULL, NULL } // NOTE: Always terminate headers will NULL
http_request_t request;
http_response_t response;
void setup() {
    request.port = 80;
    request.hostname = "";
    request.path = "/api/v1.6/variables/"VARIABLE_ID"/values";
void loop() {
 temperature=sensor.getTempCByIndex( 0 );
 sprintf(resultstr, "{\"value\":%.4f}",temperaturef); 
 request.body = resultstr;//Sending presence to Ubidots, response, headers);
 Serial.println(response.status); //For debug only



Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback


Similar projects you might like

What's My I2C Address?
  • 72
  • 3

The story of how to make a clock through using a LCD 1602 or LCD 2004 over I2C.

MyHumidity Controlled by BME280 and Photon
  • 181
  • 4

Full instructions

Checks if humidity threshold is reached and informs the user by using Blynk/IFTTT-services with softAP integration.

Tweeting Particle Photon
  • 42
  • 1

Full instructions

Tweet your friends with only the press of a button!

MyLight-Clock with NeoPixel Ring 12 Controlled by Photon
  • 260
  • 2

Full instructions

Read the time at night? Without glasses? Impossible? Focus on 2 light points, which will tell you the hour and the minute.

Map Your Particles!
  • 1,354
  • 20


Locate your Particle Photons, P1s and Electrons on a map without needing extra hardware. Use Ubidots or an offline map alternative

BME280 measures and displays on OLED controlled by Photon
  • 340
  • 2


I share my first steps with the sensor BME280 (temp / humi / pressure / altitude) and an OLED 128 * 64 px

Add projectSign up / Login