
Piarm, Release 1.0
•
music_set_volume()
: Set volume, range is 0%-100%.
•
sound_play()
: Play a sound in a specific path.
def
background_music
():
music
=
'./musics/sports-Ahjay_Stelino.mp3'
m
.
music_set_volume(
50
)
m
.
background_music(music)
Play background music
. /musics/sports-Ahjay_Stelino.mp3
at 50% volume.
•
background_music()
: Play the background music in a specific path.
def
tts
():
t
.
say(
"timing begins"
)
sleep(
1
)
t
.
say(
"three"
)
sleep(
1
)
t
.
say(
"two"
)
sleep(
1
)
t
.
say(
"one"
)
sleep(
1
)
t
.
say(
"Stop music"
)
sleep(
1
)
Write text to PiArm to make it speak.
•
say()
: Writing characters or strings in parentheses will make PiArm speak them out.
4.4 Dual Joystick Module Control
In this project, we will use the Dual Joystick Module that comes with the kit to control the PiArm.
•
Shovel Bucket - Joystick Control
•
Hanging Clip - Joystick Control
•
Electromagnet - Joystick Control
114
Chapter 4. Play with Python
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 ...