Arduino DUE + ESP-05 + Thingspeak

I’m currently experimenting with Arduino and Wifi modules like the ESP8266. Below you can find a working example where the Arduino DUE measures the temperature using a Dallas DS18B20 and uploads the temperature using a ESP-05 to my local Thingspeak server.

What do you need:

1x Arduino Due
1x Dallas 18B20
1x 4,7 kohm Resistor
1x ESP-05

You’re require an account on https://thingspeak.com/ or run your own thingspeak server locally.

Connections between Arduino Due and ESP-05

ESP Pin Arduino DUE Pin
RST
GND GND
URXD TX1
UTXD RX1
VCC3V3 3.3V
#include 
#include 

#define ONE_WIRE_BUS 7 
OneWire ourWire(ONE_WIRE_BUS); 
DallasTemperature sensors(&ourWire);

char serialbuffer[1000];

long interval = 120000;
long previousMillis = 0;

String domain = "ThingspeakIP";
String SSID = "SSID";
String Password = "PASSWORD";

void setup()
{
  sensors.begin();
  sensors.setResolution(TEMP_12_BIT); 
  Serial1.begin(9600);//connection to ESP8266
  Serial.begin(9600); //serial debug
  
  Serial1.println("AT+RST");
  delay(5000);
  Serial1.println("AT+CWMODE=1");
  delay(500);//delay after mode change
  
  //connect to wifi network
  String connectwifi = "AT+CWJAP=\"" + SSID