Reset rotation with alarm

Hello everyone.

I'm trying to make something where, when a set alarm goes off, a rotation resets to 0 to let something out of a box, and then sets back up in a sense?

It's a pillbox with a hole, where something will need to release out of it, and then sets back to closed. So a box with compartments that move, when the alarm goes off, and a "door" opens to let the pills out when the alarm goes off.

I'm very new to App Inventor and I need it for my exam, so any help would be appreciated.