Blynk Button with Time Controll

Hello!
I have Two queations for my project “Roller shutter control” and i Hope you guys can help me!

  1. i want to push a Button in Blynk to Control the electric Roller shutter up and down but i Need to control how Long the Roller shutter moves! How do i Code that?

  2. Am I able to combine my first question with a Button in my Room so that i can Control the Roller shutter with Blynk on my Smartphone and with the Button in my room?

  1. Learn how millis on Arduino works.
  2. Make it work without Blynk. When it’s done - use the state syncing from Blynk to sync physical state to the app

Ok!
I set everything up but how do I Code my normal Sketch with the blynk Sketch together with the physical state sync?

Have you read the docs? It’s specifically described in there.

http://docs.blynk.cc/#blynk-main-operations-state-syncing-for-app

Yeah ive read the docs but i dont know how to Code the state sync with my roller shutter Sketch together :frowning:

Could you give me an Code example for that?

  1. Attach Blynk app button to Virtual Pin 5 (for example)
  2. Write a code to trigger your roller shutter over a Virtual Pin:
BLYNK_WRITE(V5) //Button Widget is writing to pin V1
{
  if (param.asInt()){
    //rotate roller shutter for N seconds
  }
}

When physical button is pressed perform Blynk.virtualWrite(V5, 1) - this will turn Button in the app ON. Here is a pseudo code:

if (button is pressed) {
  Blynk.virtualWrite(5, 1) // update the state of the Button Widget in the app 
}

Thanks man that really helped me out!
But i am still able to push the button in the app so that this works “reverse”?