Simulate an ambulance

7,760
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:

mBot

Implementation:

Upload the program to Arduino

Example program download:

Simulate an ambulance.sb2

download

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.