Tadeas Dvoracek
Published

How Connect Sonoff to Cayenne

How to connect Sonoff to Cayenne.

IntermediateFull instructions provided1 hour3,226
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

Tadeas Dvoracek

10 projects • 41 followers

Comments