Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
Thinger.io
Published

Send ESP8266 analogRead to internet with Thinger.io

How to send ESP8266 analogRead to internet with Thinger.io

BeginnerProtip3,801
Send ESP8266 analogRead to internet with Thinger.io

Things used in this project

Hardware components

ESP8266 ESP-01
Espressif ESP8266 ESP-01
×1

Software apps and online services

Thinger.io Platform
Thinger.io Platform

Story

Read more

Code

Code snippet #1

Plain text
#include <ESP8266WiFi.h>
#include <ThingerESP8266.h>

#define USERNAME "your_user_name"
#define DEVICE_ID "your_device_id"
#define DEVICE_CREDENTIAL "your_device_credential"

#define SSID "your_wifi_ssid"
#define SSID_PASSWORD "your_wifi_ssid_password"

ThingerESP8266 thing(USERNAME, DEVICE_ID, DEVICE_CREDENTIAL);

void setup() {
  pinMode(BUILTIN_LED, OUTPUT);

  thing.add_wifi(SSID, SSID_PASSWORD);
  
    // LDR resource
  thing["LUX"] >> outputValue(analogRead(A0));

}

void loop() {
  thing.handle();
}

Credits

Thinger.io
3 projects • 8 followers
Contact

Comments

Please log in or sign up to comment.