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:
Functions
building 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
method
building blocks and name thempump_on
andpump_off
respectively. At the same time, drag in thesetting IO value
andSleep
building blocks into these twoFunctions
building blocks.pump_on
method: used to open the suction pumppump_off
method: 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: