Thingspeak and Wemos D1 Mini | ESP8266 Wi-Fi Module | Forum

Avatar

Please consider registering
Guest

Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

Register Lost password?
sp_Feed sp_TopicIcon
Thingspeak and Wemos D1 Mini
Avatar
tgibbs99
New Member
Forum Posts: 1
sp_UserOfflineSmall Offline
1
May 1, 2016 - 12:01 pm
sp_Permalink sp_Print

I have been trying to use the Arduino IDE examples posted on GitHub, with Wemos D1 Mini.  I am using the ReadPrivateChannel example.  The code compiles and I get no error messages.  However, the data returned is always either "0.00" or null.  I am posting data to thingspeak using other code, I am not able to get the WriteVoltage Example to work either. 

Does anyone know why this does not work with Wemos D1 mini? Is there a work around?

Thanks.

 

Tim

Avatar
mdahlb

Silver
Forum Posts: 10
sp_UserOfflineSmall Offline
2
May 8, 2016 - 12:37 pm
sp_Permalink sp_Print

Hello Tim

I have managed to read the last value (a temperature) from my private thingspeak channel with a Wemos D1 mini.. just replace the XXXXX in the code below with your personal settings:

 

#include "ThingSpeak.h"
#include <SPI.h>
#include <ESP8266WiFi.h>

char ssid[] = "XXXXXXX"; // your network SSID (name)
char pass[] = "XXXXXX"; // your network password

WiFiClient client;

unsigned long myChannelNumber = XXXXXXX;  // your channel number
const char * myReadAPIKey = "XXXXXX";  // your read api key

void setup() {
Serial.begin(115200);
WiFi.begin(ssid, pass);
ThingSpeak.begin(client);
}

void loop() {
float temperature = ThingSpeak.readFloatField(myChannelNumber, 1, myReadAPIKey);  // reads a float, in this case a temperature
Serial.print("Last temperature: ");
Serial.print(temperature);
Serial.println(" *C");
delay(15000);
}

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online:
21 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 252

Vinod: 164

cstapels: 96

piajola: 75

vespapierre: 63

Adarsh_Murthy: 59

Newest Members:

dannymm1

KamorkasOr

GRV2903

Jusikaclaiz

Raymondpoers

ScottDus

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

 

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Administrators: Hans, lee