forming a wait until command

I am newer to programming and don't know a lot of the commands, but I was screwing around and wanted to make a 4 button lock with a buzzer, but with the limited amount of programming knowledge im finding it challenging. I am looking for some sort of Until command or something that will act as a substitute.

That would be a do-while with a logical not.

Is Google broken today?

Most examples you will find use a method which works but doesn't allow your Arduino to do anything else useful.

The best way to use an Arduino is never make it wait. The loop() function should run repeatedly at high speed. Hundreds or thousands of times per second. When something changes, such as a code button being pressed then it can react to that change quickly and go back to looping. To an outside person it looks like it is waiting but it is really working very fast, just with no visible output.

If you see the delay() function used in an example then it is probably one of the bad examples.

I am looking for some sort of Until command or something that will act as a substitute.

I don't think it makes sense to think about the problem in those terms in isolation from the rest of your program.

An Arduino program (indeed any program) is running all the time - though maybe it just needs to mark time until something else occurs.

Have a look at the code in the demo Several Things at a Time and see how it manages timing and how some things only happen when the user does something.


make a 4 button lock with a buzzer

If you're thinking of a combination type lock you may find inspiration by doing a forum search using that term. Search 'password' programs also.

Sounds like you're not ready yet but, a state machine - forum search this also - would work well for this. Gotta learn sometime, eh?

It's also helpful to write out, in detail, the steps to the buzzer sounding:

A button is pressed. Has it been pressed long enough? Which button is it? What do we do if it's the correct one? If it's not the correct one? And so on.