Press two buttons to close, one to open

Hello!

Mini 12ch here.

Trying to control a servo to lock and unlock a door.
How I want it to work:
1 - If the switch in the doorlock (button 0) is “on” AND the button (Button 1) to unlock the door is pressed - the servo (Servo 1) goes to position “unlock”.
2 - When the switch in the doorlock (Button 0) is “on” for at least 10 sek - go to position lock (servo 1).

Should be easy but I havn´t figured out the AND thing… The door is not supposed to unlock as long as Button 0 is “off”.

Many thanks / Carl

Hello, Carl.

I am sorry you are having trouble getting your Maestro code to work. Have you tried using the BITWISE_AND or LOGICAL_AND commands? You can learn more about how to use those under the “Command Reference” section of the Maestro user’s guide, which you can find under the “Resources” tab of any Maestro product page.

If you are stuck, can you describe in more detail what specifically the issue is, and uploaded the simplest version of your code that should work but does not?

-Jon