Laurence Daxes
Published © MIT

Connecting LinkIt Smart 7688 Duo to Cayenne

How to connect LinkIt Duo to Cayenne. The process is very similar to Arduino Yun, but you have to enable Bridge.

IntermediateFull instructions provided1 hour1,207
Connecting LinkIt Smart 7688 Duo to Cayenne

Things used in this project

Software apps and online services

Cayenne
myDevices Cayenne

Story

Read more

Schematics

Hardware Overview

Code

Enable Bridge

SH
uci set yunbridge.config.disabled='0'  
uci commit  
reboot  
Runn

LinkIt-Duo.ino

Arduino
#define CAYENNE_DEBUG         // Uncomment to show debug messages
#define CAYENNE_PRINT Serial  // Comment this out to disable prints and save space
#include <BridgeClient.h>
#include <CayenneYun.h>

char token[] = "o4ygx08hpx";

// Custom Widget
#define VIRTUAL_PIN 1
#define LED_DIGITAL_PIN 12

void setup(){
  pinMode(LED_DIGITAL_PIN, OUTPUT);
  Serial.begin(9600);
  Cayenne.begin(token);  
}

CAYENNE_IN(VIRTUAL_PIN){  
  int currentValue = getValue.asInt(); // 0 to 1  
  if (currentValue == 1) { 
    digitalWrite(LED_DIGITAL_PIN, HIGH);
  } else { 
    digitalWrite(LED_DIGITAL_PIN, LOW);
  }
}

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

Credits

Laurence Daxes

Laurence Daxes

19 projects • 36 followers
Systems Engineer Bachellor, I Love technology, and IoT World https://youtube.com/c/DaxesHacks

Comments