I used my Auriga board to make a traffic barrier with an alarm. The mBot can only go through after flashing its lights three times. If the barrier is closed, the mBot can’t be too close to the gate, otherwise the alarm will go off.
This project uses the light sensors of the Auriga board to check whether the mBot has made the right light signal.
More on YouTube (including mBlock 3 code): https://youtu.be/NjyUwWLsz30