Simulate an ambulance

Author: Yisong Xu, Si Xu

Press the onboard button and mBot gives warning light and sound while its moving forward, so as to simulate an ambulance.

Hardware requirements:



Upload the program to Arduino

Example program download:

Simulate an ambulance.sb2


Example programs


Script description
Ambulance effects: Moving forward and flashing the blue light on the top. In Example 2 Alternating blink we introduced how to realize alternative flashing of the onboard Led and in Example 7 Ambulance Sound we introduced how to make the onboard buzzer give ambulance sound effects. In this example we will combine the two examples to simulate ambulance light and sound effects. As it takes some time to play the tone, Block  can be replaced by the block playing the tone to realzed the example effects in Example 2 Alternating blink.


Extended tasks
Decorate mBot and make it look like an ambulance.