Background Music

In addition to programming the PiCar-X to play sound effects or text-to-speech (TTS), the PiCar-X will also play background music. This project will also use a Slider widget for adjusting the music volume.

For a detailed tutorial on Ezblocks remote control functions, please reference the Remote Control tutorial.



The play background music block will need to be added to the Start function. Use the drop-down menu to choose different background music for the PiCar-X to play.


The block set background music volume to will adjust the volume between the range of 0 to 100.


Drag a Slider bar from the Remote Control page to adjust music volume.


The slider [A] get value block will read the slider value. The example above has slider ‘A’ selected. If there are multiple sliders, use the drop-down menu to select the appropriate one.



  • You can write the program according to the following picture, please refer to the tutorial: How to Create a New Project?.

  • Or find the code with the same name on the Examples page of the EzBlock Studio and click Run or Edit directly.