Cayenne_in error


#1

Hello. My problem is that i can’t get a value from the slider in my program. I’m using arnuino uno and ethernet shield W5100.


image


#2

try with this code:

CAYENNE_IN(2)
{
  int x = getValue.asInt();
   analogWrite(ACTUATOR_PIN, x);
  Serial.println(x);
}

Add a slider from Add new > device/widget > Actuator > Generic > PWM fill all the details and select channel 2.