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

How Connect Sonoff to Cayenne

How to connect Sonoff to Cayenne.

IntermediateFull instructions provided1 hour3,231
How Connect Sonoff to Cayenne

Things used in this project

Hardware components

SparkFun FTDI Basic Breakout - 3.3V
SparkFun FTDI Basic Breakout - 3.3V
×1
Sonoff Basic
Itead Sonoff Basic
×1

Software apps and online services

Cayenne
myDevices Cayenne
Arduino IDE
Arduino IDE

Story

Read more

Schematics

Sonoff schematics

Code

Code

Arduino
//#define CAYENNE_DEBUG         // Uncomment to show debug messages
#define CAYENNE_PRINT Serial  // Comment this out to disable prints and save space
#include "CayenneDefines.h"
#include "BlynkSimpleEsp8266.h"
#include "CayenneWiFiClient.h"

// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token[] = "TOKEN";
// Your network name and password.
char ssid[] = "SSID";
char password[] = "PASSWORD";

void setup()
{
  Serial.begin(9600);
  Cayenne.begin(token, ssid, password);
}

void loop()
{
  Cayenne.run();
}

Credits

Tadeas Dvoracek
10 projects • 41 followers
Contact

Comments

Please log in or sign up to comment.