
Piarm, Release 1.0
3.3.2 Programming
Step 1
You may want to simplify the program with
Functions
, especially when you perform the same operation multiple
times. Putting these operations into a newly declared function can greatly facilitate your use.
Click on the
Functions
category and select the appropriate function block, the function you created will also appear
here.
The
Function
block without output is used here.
Step 2
Create a function named [music], after creating it you will see it in the
Functions
category.
Now let the [music] function implement playing background music at 50% volume.
• [set background music volume to ()]: Used to set the volume of the background music, in the range of 0%-100%.
• [play background music ()]: This block is a separate thread and can play some built-in background music.
34
Chapter 3. Play with Ezblock
Summary of Contents for PiArm
Page 1: ...Piarm Release 1 0 www sunfounder com Mar 31 2022 ...
Page 2: ......
Page 4: ...ii ...
Page 6: ...Piarm Release 1 0 2 CONTENTS ...
Page 8: ...Piarm Release 1 0 4 Chapter 1 Component List and Assembly Instructions ...
Page 48: ...Piarm Release 1 0 44 Chapter 3 Play with Ezblock ...
Page 91: ...Piarm Release 1 0 3 9 GAME Iron Collection 87 ...
Page 92: ...Piarm Release 1 0 88 Chapter 3 Play with Ezblock ...
Page 99: ...Piarm Release 1 0 Step 7 Click the WRITE button 4 1 Quick Guide on Python 95 ...
Page 148: ...Piarm Release 1 0 Yes then Ok Finish 144 Chapter 5 Appendix ...
Page 152: ...Piarm Release 1 0 Step 4 Double click the connection just created 148 Chapter 5 Appendix ...
Page 160: ...Piarm Release 1 0 156 Chapter 5 Appendix ...