Virtual Pins function loop/stop and RGB Strip fade effects

and now you can play with sliders :smile:

void rgb() {
  if (btnState == true) {
    time1 = millis();
    redVal = 128 + 127 * cos(2 * PI / period * (Speed-time1));
    greenVal = 128 + 127 * cos(2 * PI / period * (offset+Speed - time1));
    blueVal = 128 + 127 * cos(2 * PI / period * (offset2+Speed  - time1));
    red.setValue(redVal);
    green.setValue(greenVal);
    blue.setValue(blueVal);
  }
}

BLYNK_WRITE(V28) { //slider
  period = param.asInt();
  }

  BLYNK_WRITE(V29) { //slider
  Speed = param.asInt();
  }

Video_2019-05-04_190428

1 Like