
Piarm, Release 1.0
• [constrain () low () high ()]: From Math category for setting the variation of a constant to a certain range.
• [if else]: Conditional judgment block, you can create multiple conditional judgments by clicking the set icon
and dragging [else] or [else if] to the right below the [if].
Step 3
A new function, [record], is created to record the current actions and to allow PiArm to reproduce them.
• The left and right buttons of the Dual Joystick Module are connected to
D0 (Left Button)
,
D1 (Right Buttbon)
respectively.
• The buttons will output low level (0) when pressed and output high level (1) when released.
• When the
button of the left joystick
is pressed, the action of PiArm will be recorded at this time, and there will
be a voice prompt to indicate the completion of recording.
• When the
button of the right joystick
is pressed, PiArm will reproduce these recorded actions.
Note:
• The [if else], [and] and [=] blocks are all from the
Logic
category.
• [run the recorded actions at () internal]: This block is used to set the time interval for each set of recorded
actions, if it is 0 it will reproduce each set of actions continuously.
Step 4
Put the [set_position] and [record] functions into the [Forever] block to execute them sequentially, and finally click the
Download
button to run the code.
Now you can use the joystick to control PiArm, press the
button of the left joystick
to record the desired actions, and
after recording a few groups, press the
button of the right joystick
to make PiArm reproduce these actions.
72
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 ...