Connectivity


#1

I have some problemes with the type of connectivity. Indeed, I can’t choose, it’s automatically virtual connectivity and it’s the only one. Or, I need digital connectivity how to do?


#2

as simple as it goes. virtual connectivity is channel used for communication between cayenne server(dashboard) and device(arduiono or esp8266). so when adding a button widget to turn on a led, you add button widget on your dashboard with channel 1 (virtual connectivity) and then use below code to read the value of the button :

 CAYENNE_IN(1)
{
	int x = getValue.asInt();
        digitalWrite( led_pin, x); 
	}

where the value of channel 1 button is stored in x. “led_pin” is the digital pin of arduino where the led is connected and you use digitalWrite to turn on off led.


#3

The problem is normally on the dashboard I can choose the type of connectivity but in my case when I add widgetand go to this point there is no choice. There is only virtual connectivity. I want to switch on/off a LED not to have the data between the devices.


#4

this is because of the new version of cayenne MQTT.

look at the above post. it turns on the led on/off.


#5

But the code that you gave me is that a code that I add after I copy/paste the sketch when I add “Light widget”?
Because I’m really lost.


#6

which device you are using to connect to cayenne?


#7

I’m a beginner I just want to test how by the IOT Cyenne plateform can I switch on a LED


#8

But the problem is when I try to follow the instruction like in the video I can’t because there isn’t digital connectivity when I click on actuator light widget


#9

have a look at this Adding a New Device using MQTT