Manual

Table Of Contents
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