Manual
Table Of Contents
- 1. Introduction
- 2. FlickerLED Demo
- 3. AlarmLED Demo
- 4. AdjustLED Demo
- 5. Button Demo
- 6. SeedVoiceLED Demo
- 7. MoveBlock Demo
- 8. SeedVoiceDobot Demo
- 9. JoyStick Demo
- 10. DobotPixy Demo
- Appendix A Common Function Description
- Appendix B Installing Suction Cup Kit
- Appendix C Pixy Install and Configure Pixy
- Appendix D Vision Recognition Initialization Process
- Appendix E Multiplexed I/O Interface Description of V1 Dobot Magician
- Appendix F Multiplexed I/O Interface Description of V2 Dobot Magician
Arduino Kit Demo Description 10 DobotPixy Demo
Issue V2.1 (2019-12-05) Demo Description Copyright © Yuejiang Technology Co., Ltd
58
topic describes the common functions in Arduino demo.
Attached table 60 Return the number of cubes Pixy has detected
Prototype
uint16_t getBlocks()
Description
Obtain the number of cubes Pixy has detected. You can then look in the
pixy.blocks[] array for information about each detected object (one array
member for each detected object.) Each array member (i) contains the following
fields
If the vision sensor is Pixy:
pixy.blocks[i].signature : The signature number (color) of the
detected cube (1-7).
pixy.blocks[i].x: The X-coordinate of the center of the detected
object (0-319).
pixy.blocks[i].y: The Y-coordinate of the center of the detected object
(0-319).
pixy.blocks[i].width: The width of the detected cube (1-320).
pixy.blocks[i].height: The height of the detected cube (1-200).
If the vision sensor is Pixy2:
pixy.ccc.blocks[i].m_signature: The signature number (color) of the
detected cube (1-7).
pixy.ccc.blocks[i].m_x : The X-coordinate of the center of the
detected object (0-319).
pixy.ccc.blocks[i].m_y : The Y-coordinate of the center of the
detected object (0-319).
pixy.ccc.blocks[i].m_width: The width of the detected cube (1-320).
pixy.ccc.blocks[i].m_height: The height of the detected cube (1-200).
Parameter
None
Return
Return the number of cubes Pixy has detected