User Suction Pump
Before the start
1. Make sure the machine is powered on
2. Make sure the machine connection is normal
This chapter introduces how to use blockly to control the suction pump connected to the Mercury A1 robotic arm (as shown below)

API display


The following building blocks are mainly used
1:
setting IO value: Set the IO output status at the end of the robot arm- Parameter introduction:
This module has two parameters that can be adjusted:
- IO pin: 1-2
 - IO output status: 0-low level, 1-high level
 
 
- Parameter introduction:
This module has two parameters that can be adjusted:
 2:
Functionsbuilding blocks: modularize a set of building blocks- Parameter introduction: This module has a parameter that can be adjusted: *Method name: Name the method
 
Small case
First, you need to create two
methodbuilding blocks and name thempump_onandpump_offrespectively. At the same time, drag in thesetting IO valueandSleepbuilding blocks into these twoFunctionsbuilding blocks.pump_onmethod: used to open the suction pumppump_offmethod: used to turn off the suction pump
2、At the same time, you can find that there are two usable pump_on and pump_off building blocks in the method classification.

Added code using the pump_on and pump_off building blocks. The complete code is as follows:
