Demo Description Arduino Kit Demo Description Issue: V2.1 Date: 2019-12-05 Shenzhen Yuejiang Technology Co.
Arduino Kit Demo Description Copyright © ShenZhen Yuejiang Technology Co., Ltd 2019. All rights reserved. No part of this document may be reproduced or transmitted in any form or by any means without prior written consent of Yuejiang Technology Co., Ltd Disclaimer To the maximum extent permitted by applicable law, the products described (including its hardware, software and firmware, etc.) in this document are provided AS IS, which may have flaws, errors or faults.
Arduino Kit Demo Description Preface Preface Purpose This document describes the Demo environment setup of the Arduino Kit, the Demo module connection, and key code descriptions for entry-starting creators and non-electronics enthusiasts.
Arduino Kit Demo Description Contents Contents Introduction .............................................................................................................. 1 Overview ........................................................................................................................... 1 Software Environment ...................................................................................................... 1 FlickerLED Demo ...........................................................
Arduino Kit Demo Description Contents Critical Code Description ............................................................................................... 29 DobotPixy Demo................................................................................................... 32 Introduction ..................................................................................................................... 32 Hardware Connection ...........................................................................
Arduino Kit Demo Description 1 Introduction Introduction Overview Arduino kit includes Arduino Mega2560 controller board, LED indicators, buttons, joystick, Grove speech recognizer and Pixy vision sensor, of which the demos are based on the Arduino Mega2560 controller board and developed by Dobot.
1 Introduction Arduino Kit Demo Description Figure 1.1 Add Dobot library NOTICE In Arduino demos, if the Dobot Magician, SmarkKit or Pixy vision sensor is used, please open the corresponding demo with Arduino IDE and select the corresponding library on the Sketch > Include Library menu. If the speech recognizer is used, please select SoftwareSerial on the Sketch > Include Library menu to build software serial communication. Issue V2.
2 FlickerLED Demo Arduino Kit Demo Description FlickerLED Demo Introduction This Demo uses the Arduino to turn on and off the LED indicator. Hardware Connection The LED indicator and Arduino Mega2560 controller board are required in this demo. Figure 2.1 shows its connection process. Figure 2.1 FlickerLED Connection NOTE If you connect the skill kit to other interfaces on the Arduino Mega2560, you also need to modify the right interfaces that the skill kit connects to in the SmartKit.h file.
2 FlickerLED Demo Arduino Kit Demo Description #define BUTTON_REDPIN A0 // Interface that the red button connects to #define BUTTON_GREENPIN A2 // Interface that the green button connects to #define BUTTON_BLUEPIN A4 // Interface that the blue button connects to Realization Process Figure 2.2 shows its realization process. Figure 2.2 Realization process Critical Code Description Before debugging this demo, please select SmartKit library on the Sketch > Include Library menu. Initialization.
3 AlarmLED Demo Arduino Kit Demo Description AlarmLED Demo Introduction This Demo uses the Arduino to turn on and off three different colored LED indicators. Only one LED indicator is on at a time. Hardware Connection The three LED indicators and Arduino Mega2560 controller board are required in this demo. Figure 3.1 shows its connection process. Figure 3.
3 AlarmLED Demo Arduino Kit Demo Description #define BUTTON_REDPIN A0 // Interface that the red button connects to #define BUTTON_GREENPIN A2 // Interface that the green button connects to #define BUTTON_BLUEPIN A4 // Interface that the blue button connects to Realization Process Figure 3.2 shows its realization process. Figure 3.2 Realization process Critical Code Description Before debugging this demo, please select SmartKit library on the Sketch > Include Library menu. Initialization.
3 AlarmLED Demo Arduino Kit Demo Description Set the pins to HIGH or LOW to control the three LED indicators. Program 3.3 Set High/Low level void loop() { SmartKit_LedTurn(RED, ON); delay(300); SmartKit_LedTurn(RED, OFF); SmartKit_LedTurn(GREEN, ON); delay(300); SmartKit_LedTurn(GREEN, OFF); SmartKit_LedTurn(BLUE, ON); delay(300); SmartKit_LedTurn(BLUE, OFF); } Issue V2.1 (2019-12-05) Demo Description 7 Copyright © Yuejiang Technology Co.
4 AdjustLED Demo Arduino Kit Demo Description AdjustLED Demo Introduction This demo uses the joystick to control the brightness of the LED indicator. Hardware Connection The LED indicator, joystick and Arduino Mega2560 are required in this demo. Figure 4.1 shows its connection process. Figure 4.1 AdjustLED Connection NOTE If you connect the skill kit to other interfaces on the Arduino Mega2560, you also need to modify the right interfaces that the skill kit connects to in the SmartKit.h file.
4 AdjustLED Demo Arduino Kit Demo Description #define BUTTON_REDPIN A0 // Interface that the red button connects to #define BUTTON_GREENPIN A2 // Interface that the green button connects to #define BUTTON_BLUEPIN A4 // Interface that the blue button connects to Realization Process This demo controls the brightness of the LED indicator by moving the joystick along X-axis. Figure 4.2 shows its realization process. Figure 4.
4 AdjustLED Demo Arduino Kit Demo Description Figure 4.3 Program 4.3 Analog value range Define the brightness variation of LED indicator double xValueTOAnalogScale = 1023/255; // Calculate the joystick value and transform to the output analog value value = SmartKit_JoyStickReadXYValue(AXISX); // Get the analog value of the X axis of the joystick Adjust the brightness of the LED indicator over joystick. Program 4.
5 Button Demo Arduino Kit Demo Description Button Demo Introduction This demo uses three different colored buttons to turn on and off the corresponding colored LED indicators respectively. Hardware Connection The three buttons, three LED indicators and Arduino Mega250 are required in this demo. Figure 5.1 shows its connection process. Figure 5.
5 Button Demo Arduino Kit Demo Description #define LED_BLUEPIN #define BUTTON_REDPIN A3 A0 // Interface that the blue LED indicator connects to // Interface that the red button connects to #define BUTTON_GREENPIN A2 // Interface that the green button connects to #define BUTTON_BLUEPIN A4 // Interface that the blue button connects to Realization Process Figure 5.2 shows its realization process. Figure 5.
5 Button Demo Arduino Kit Demo Description Use the buttons to turn on and off the LED indicators. Program 5.3 Use buttons to turn on and off the LED indicators if (SmartKit_ButtonCheckState(color) == TRUE) // Check the button status { SmartKit_LedTurn(color, ON); //Turn on the LED indicator SmartKit_LedTurn(color, OFF); //Turn off the LED indicator } else { } …… ….. Issue V2.1 (2019-12-05) Demo Description 13 Copyright © Yuejiang Technology Co.
6 SeedVoiceLED Demo Arduino Kit Demo Description SeedVoiceLED Demo Introduction The demo uses Grove speech recognizer to turn on and off three different colored LED indicators (Red, Green, and Blue). Hardware Connection The speech recognizer, three LED indicators and Arduino Mega2560 are required in this demo. Figure 6.1 shows its realization process. Figure 6.
6 SeedVoiceLED Demo Arduino Kit Demo Description #define BUTTON_REDPIN A0 // Interface that the red button connects to #define BUTTON_GREENPIN A2 // Interface that the green button connects to #define BUTTON_BLUEPIN A4 // Interface that the blue button connects to Realization Process Figure 6.2 shows its realization process. NOTE Please speak out the command Hicell to wake up the Grove speech recognizer before using it. If successful, the LED on the speech recognizer will turn red.
6 SeedVoiceLED Demo Arduino Kit Demo Description Serial.begin(115200); SmartKit_Init(); SmartKit_VoiceENGStart(); Serial.println("Start..."); } Control the LED indicator by voice commands. Program 6.3 Control the LED indicator by voice commands void loop() { if(SmartKit_VoiceENGVoiceCheck(1) == TRUE) { SmartKit_LedTurn(RED,ON); SmartKit_LedTurn(BLUE,ON); SmartKit_LedTurn(GREEN,ON); Serial.
Arduino Kit Demo Description 6 SeedVoiceLED Demo "Next", //return 5 "Previous", //return 6 "Up", //return 7 "Down", //return 8 "Turn on the TV", //return 9 "Turn off the TV", //return 10 "Increase temperature", //return 11 "Decrease temperature", //return 12 "What's the time", //return 13 "Open the door", //return 14 "Close the door", //return 15 "Left", //return 16 "Right", //return 17 "Stop", //return 18 "Start", //return 19 "Mode 1", //return 20 "Mode 2", //return 21 "
7 MoveBlock Demo Arduino Kit Demo Description MoveBlock Demo Introduction The demo uses Arduino to control Dobot Magician for picking and placing cubes. Hardware Connection Arduino Mega2560, Dobot Magician and suction cup kit are required in this demo. Figure 7.1 shows its connection process. Figure 7.1 MoveBlock Connection For details how to connect Dobot Magician and suction cup kit, please see Appendix B Installing Suction Cup Kit.
7 MoveBlock Demo Arduino Kit Demo Description #define BUTTON_REDPIN A0 // Interface that the red button connects to #define BUTTON_GREENPIN A2 // Interface that the green button connects to #define BUTTON_BLUEPIN A4 // Interface that the blue button connects to Realization Process If the cube is moved from point A to point B and then from point B back to point A with multiple times. Figure 7.2 shows its realization process. Figure 7.
7 MoveBlock Demo Arduino Kit Demo Description \ Figure 7.3 Obtain Cartesian coordinates Define the coordinates of point A and point B The coordinates can be obtained from the Operation Panel of DobotStudio page. Program 7.
7 MoveBlock Demo Arduino Kit Demo Description #define Des_position_X 207 //X-coordinate of B point #define Des_position_Y -171 //Y-coordinate of B point #define Des_position_Z -46 //Z-coordinate of B point #define Des_position_R 0 // R-coordinate of B point Dobot Magician moves from point A to point B with multiple times. Program 7.
8 SeedVoiceDobot Demo Arduino Kit Demo Description SeedVoiceDobot Demo Introduction This demo uses Grove speech recognizer to control the Dobot Magician movement and the air pump start-stop. Hardware Connection Grove speech recognizer, Dobot Magician, air pump and Arduino Mega2560 are required in this demo. The connection between Dobot Magician and Arduino is shown in Figure 8.1. Figure 8.1 SeedVoiceDobot Connection The connection between Dobot Magician and air pump is shown in Figure 8.2. Figure 8.
8 SeedVoiceDobot Demo Arduino Kit Demo Description NOTE If you connect the skill kit to other interfaces on the Arduino Mega2560, you also need to modify the right interfaces that the skill kit connects to in the SmartKit.h file. Program 8.
8 SeedVoiceDobot Demo Arduino Kit Demo Description Figure 8.3 Realization process Critical Code Description This demo uses Grove speech recognizer to control Dobot Magician, the Dobot library, SmartKit library and SoftwareSerial library need to be called. Before debugging this Demo, please select Dobot, SmartKit, and SoftwareSerial on the Sketch > Include Library menu. Issue V2.1 (2019-12-05) Demo Description 24 Copyright © Yuejiang Technology Co.
8 SeedVoiceDobot Demo Arduino Kit Demo Description NOTICE Please long press the Key button on the back of base of Dobot Magician to operate homing before debugging this Demo. Initialization. Program 8.2 Initialization void setup() { Serial.begin(115200); Dobot_Init(); SmartKit_Init(); SmartKit_VoiceENGStart(); Serial.println("Start..."); } Move Dobot Magician by voice commands. Program 8.
Arduino Kit Demo Description "Turn on the light", 8 SeedVoiceDobot Demo //return 1 "Turn off the light", //return 2 "Play music", //return 3 "Pause", //return 4 "Next", //return 5 "Previous", //return 6 "Up", //return 7 "Down", //return 8 "Turn on the TV", //return 9 "Turn off the TV", //return 10 "Increase temperature", //return 11 "Decrease temperature", //return 12 "What's the time", //return 13 "Open the door", //return 14 "Close the door", //return 15 "Left", //return 16
9 JoyStick Demo Arduino Kit Demo Description JoyStick Demo Introduction This demo uses joystick and three buttons to control the Dobot Magician movement and the air pump start-stop. Hardware Connection Joystick module, button, Dobot Magician, air pump, and Arduino Mega2560 are required in this demo. The connections between them are shown in Figure 9.1. Figure 9.1 JoyStick Connection The connection between Dobot Magician and air pump is shown in Figure 9.2. Figure 9.
9 JoyStick Demo Arduino Kit Demo Description Program 9.
9 JoyStick Demo Arduino Kit Demo Description Figure 9.3 Realization process Critical Code Description This demo uses joystick to control Dobot Magician, the Dobot library and SmartKit library need to be called. Before debugging this Demo, please select Dobot and SmartKit on the Sketch > Include Library menu. NOTICE Please long press the Key button on the back of the base of Dobot Magician to operate the homing procedure before debugging this Demo. Issue V2.
9 JoyStick Demo Arduino Kit Demo Description Initialization. Program 9.2 Initialization void setup() { Dobot_Init(); SmartKit_Init(); } Define the moving direction of Dobot Magician and the air pump start-stop based on the moving direction of joystick and buttons. NOTE When moving joystick along X-axis or Y-axis, the analog values change from 0 to 1023, as shown Figure 9.4. The homing position of the joystick is at (x,y: 512,508). Figure 9.4 Program 9.
9 JoyStick Demo Arduino Kit Demo Description else if(y < 400){ // JoyStick moves alongt Y-axis in the negative direction direction = 2; } …... …… Control the Dobot Magician and air pump by the joystick Program 9.4 Control the Dobot Magician and air pump switch(direction){ case 1: Serial.println("forward"); Dobot_SetPTPCmdEx(MOVL_INC,20,0,0,0); //Dobot Magician moves forward Serial.print("x="); Serial.println(x); Serial.print("y="); Serial.println(y); break; case 2: Serial.
10 DobotPixy Demo Arduino Kit Demo Description DobotPixy Demo Introduction This demo uses Pixy vision sensor and Dobot Magician to recognize and pick-place different color cubes. Hardware Connection Arduino Mega2560, Pixy vision sensor, Dobot Magician and suction cup kit are required in this demo. For details about the installation and configuration of Pixy vision sensor, please see Appendix C Pixy Install and Configure Pixy.
10 DobotPixy Demo Arduino Kit Demo Description #define LED_GREENPIN A1 // Interface that the green LED indicator connects to #define LED_BLUEPIN A3 // Interface that the blue LED indicator connects to #define BUTTON_REDPIN A0 // Interface that the red button connects to #define BUTTON_GREENPIN A2 // Interface that the green button connects to #define BUTTON_BLUEPIN A4 // Interface that the blue button connects to Realization Process If there are eight cubes with different colors (red, yellow,
10 DobotPixy Demo Arduino Kit Demo Description Figure 10.2 Issue V2.1 (2019-12-05) Realization process Demo Description 34 Copyright © Yuejiang Technology Co.
10 DobotPixy Demo Arduino Kit Demo Description Critical Code Description This demo uses Pixy vision sensor and Dobot Magician to pick and place cubes. The Dobot library, SmartKit library, and Pixy library need to be called. Before debugging this Demo, please select Dobot, SmartKit, and Pixy on the Sketch > Include Library menu. NOTICE Please long press the Key button on the back of base of Dobot Magician to operate the homing procedure before debugging this Demo. Initialization.
10 DobotPixy Demo Arduino Kit Demo Description Pick and place cubes. If there are multiple cubes in the same color, these cubes will be piled when placing them. Program 10.3 SmartKit_VISRun(); Pick and place cubes //Vision recognition: Obtain the numbers, colors and coordinates of the cubes.
10 DobotPixy Demo Arduino Kit Demo Description Common Function Description Common Function of SmartKit SmartKit library encapsulates the common functions that users need to use. Please load the SamrtKit library to the Arduino before debugging demos.
10 DobotPixy Demo Arduino Kit Demo Description Prototype int SmartKit_LedCheckState(char color) Description Check the LED indicator status Parameter color: LED indicator color. Value range: BLUE, GREEN, RED Return LED indicator status: ON or OFF Attached table 6 LED indicator status control Prototype int SmartKit_LedTurn(char color, int state) Description Control the LED indicator status Parameter color: LED indicator color. Value range: BLUE, GREEN, RED state: LED indicator status.
10 DobotPixy Demo Arduino Kit Demo Description "Turn off the light", //return 2 "Play music", //return 3 "Pause", //return 4 "Next", //return 5 "Previous", //return 6 "Up", //return 7 "Down", //return 8 "Turn on the TV", //return 9 "Turn off the TV", //return 10 "Increase temperature", //return 11 "Decrease temperature", //return 12 "What's the time", //return 13 "Open the door", //return 14 "Close the door", //return 15 "Left", //return 16 "Right", //return 17 "Stop", //re
10 DobotPixy Demo Arduino Kit Demo Description 𝑥1′ corresponding Cartesian coordinates B [𝑦1′ 1 𝑥2′ 𝑦2′ 1 𝑥3′ 𝑦3′ ] of three points to obtain the 1 rotation matrix, so that after the image coordinates of a cube are obtained by the Pixy vision sensor, the corresponding Cartesian coordinates where Dobot Magician will move to can be calculated with the RT matrix, as shown in. The formula is 𝐁 = 𝑹𝑻 𝑨.
10 DobotPixy Demo Arduino Kit Demo Description length3: Length of the cube3 wide3: Width of the cube3 Return None Attached table 12 Set the Z-axis coordinate of the pickup area Prototype void SmartKit_VISSetGrapAreaZ( float z) Description Set the Z-axis coordinate of the pickup area Parameter z: The height of the pickup area Return None Attached table 13 Obtain the Z-axis coordinate of the pickup area Prototype float SmartKit_VISGetGrapAreaZ(void) Description Obtain the Z-axis coordinate
10 DobotPixy Demo Arduino Kit Demo Description Prototype char SmartKit_VISSetBlockTA(char color, float x, float y, float z, float r) Description Set the placing position of the cube Parameter color: Cube color.
10 DobotPixy Demo Arduino Kit Demo Description Parameter color: Cube color.
10 DobotPixy Demo Arduino Kit Demo Description FALSE: The placement is failed Common Function of Dobot Magician Dobot Magician communicates with Arduino over UART interface (10 PIN) on the base of the Dobot Magician, using the Dobot protocol. We have provided Dobot library which encapsulates part of the Dobot Magician API, being called directly to control Dobot Magician. This topic describes the common functions that are used in Arduino demo.
10 DobotPixy Demo Arduino Kit Demo Description Attached table 26 Control the start-stop of air pump Prototype void Dobot_SetEndEffectorSuctionCupEx(bool issuck) Description Control the start-stop of the air pump Parameter Issuck: Whether to turn on the air pump.
10 DobotPixy Demo Arduino Kit Demo Description Attached table 29 Get the device clock Prototype uint32_t Dobot_GetDeviceTimeEx(void) Description Get the device clock Parameter None Return Return the device clock Attached table 30 Set the sliding rail status Prototype void Dobot_SetDeviceWIthLEx(bool isWithL) Description Set the Sliding rail status Parameter isWithL: 0:Disabled, 1:Enabled Return None Attached table 31 Execute the homing function Prototype Void Dobot_SetHOMECmdEx( void
10 DobotPixy Demo Arduino Kit Demo Description Description Enable laser Parameter isEnable: Control laser. 0: Disabled, 1: Enabled power: PWM duty cycle:0-100 Return None Attached table 34 Set gripper status Prototype void Dobot_SetEndEffectorGripperEx(bool isEnable,bool isGriped) Description Set gripper status Parameter isEnable: Control end-effector. 0: Disabled, 1: Enabled isGriped: Control the gripper to grab or release.
10 DobotPixy Demo Arduino Kit Demo Description BN_DOWN, …… //Y-/Joint2CP_DOWN, …… //Z+/Joint3+ CN_DOWN, …… //Z-/Joint3DP_DOWN, ……//R+/Joint4+ DN_DOWN, …… //R-/Joint4LP_DOWN, ……//L+ LN_DOWN ……//L}; Return None Attached table 37 Set the velocity ratio and the acceleration ratio in PTP mode Prototype void Dobot_SetPTPCommonParamsEx(float velocityRatio,float accelerationRatio) Description Set the velocity ratio and the acceleration ratio in PTP mode Parameter velocityRatio: velocity ratio in PTP mode
10 DobotPixy Demo Arduino Kit Demo Description Return None Attached table 40 Set the lifting height in JUMP mode Prototype void Dobot_SetPTPJumpParamsEx( float jumpHeight) Description Set the lifting height in JUMP mode Parameter jumpHeight: The lifting height Return None Attached table 41 Execute a PTP command with the sliding rail Prototype void Dobot_SetPTPWithLCmdEx(uint8_t Model,float x,float y,float z,float r,float l) Description Execute a PTP command with the sliding rail Paramete
10 DobotPixy Demo Arduino Kit Demo Description }; x、y、z、r: Coordinate parameters in PTP mode.
10 DobotPixy Demo Arduino Kit Demo Description Attached figure 13 Issue V2.1 (2019-12-05) Obtain the image coordinates Demo Description 51 Copyright © Yuejiang Technology Co.
Arduino Kit Demo Description 10 DobotPixy Demo Multiplexed I/O Interface Description for details function: I/O multiplexing function Details for function: Issue V2.1 (2019-12-05) Demo Description 52 Copyright © Yuejiang Technology Co.
10 DobotPixy Demo Arduino Kit Demo Description typedef enum { IOFunctionDummy; //Invalid IOFunctionDO; // I/O output IOFunctionPWM; // PWM output IOFunctionDI; //I/O input IOFunctionADC; //A/D input IOFunctionDIPU; //Pull-up input IOFunctionDIPD //Pull-down input } Return None Attached table 43 Set I/O output Prototype void Dobot_SetIODOEx(uint8_t address,uint8_t value) Description Set I/O output Parameter address: /O address(1~20) value: Low level(0), High level(1) Return None A
10 DobotPixy Demo Arduino Kit Demo Description Attached table 46 Get A/D input Prototype uint16_t Dobot_GetIOADCEx( uint8_t address) Description Get A/D input Parameter address: I/O address(1~20 ) Return Return A/D input Attached table 47 Set the velocity of extended motor Prototype void Dobot_SetEMotorEx( uint8_t address, uint8_t enable, uint32_t speed) Description Set the velocity of extended motor Parameter address: Motor index. 0:Stepper1, 1:Stepper2 enable: Control motor.
10 DobotPixy Demo Arduino Kit Demo Description corresponding interface Details for port: enum { IF_PORT_GP1; IF_PORT_GP2; IF_PORT_GP4; IF_PORT_GP5; }; Return None Attached table 50 Get the color sensor value Prototype uint8_t Dobot_GetColorSensorEx( uint8_t color) Description Get the color sensor value Parameter color: 0:Red, 1:Green, 2:Blue Return Retun the color sensor value Attached table 51 Set the losing-step threshold Prototype void Dobot_SetLostStepSetEx(float lostStepValue) Descrip
10 DobotPixy Demo Arduino Kit Demo Description Description Set the IR sensor Parameter enable: 0:Disabled, 1:Enabled port: the Dobot interface that the IR sensor is connected to.
10 DobotPixy Demo Arduino Kit Demo Description Return None Attached table 56 Set the specified digital pin to HIGH or LOW Prototype void digitalWrite( uint8_t pin, uint8_t value) Description Set the specified digital pin to HIGH or LOW Parameter pin: Pin number of the pin mode: HIGH or LOW Return None Attached table 57 Read the specified digital pin Prototype int digitalRead( uint8_t pin) Description Read the specified digital pin Parameter pin: Pin number of the pin Return HIGH or LO
10 DobotPixy Demo Arduino Kit Demo Description 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].
10 DobotPixy Demo Arduino Kit Demo Description Installing Suction Cup Kit Procedure When picking and placing cubes with Dobot Magician, the suction cup kit should be installed on the end of the Dobot Magician Attached figure 1 Connect the air pump to the Dobot Magician Attached figure 2 Issue V2.1 (2019-12-05) Install a suction cup kit Demo Description 59 Copyright © Yuejiang Technology Co.
10 DobotPixy Demo Arduino Kit Demo Description Attached figure 3 Install an air tube NOTE If the suction cup matched with the suction cup kit cannot catch cubes, please replace with the suction cup matched with the Arduino kit, as shown in Attached figure 4 Issue V2.1 (2019-12-05) Suction cup matched with the Arduino kit Demo Description 60 Copyright © Yuejiang Technology Co.
Arduino Kit Demo Description Attached figure 5 Issue V2.1 (2019-12-05) 10 DobotPixy Demo Connect the servo’s GP3 cable to the GP3 connector Demo Description 61 Copyright © Yuejiang Technology Co.
10 DobotPixy Demo Arduino Kit Demo Description Pixy Install and Configure Pixy Before debugging the DobotPixy Demo, you need to install and configure the Pixy vision sensor. Prerequisites The PixyMon has been installed, which is obtained from arduino kit/PixyMon. The suction kit has been installed on the end of Dobot Magician. The cubes have been obtained. Procedure Attached figure 6 Issue V2.1 (2019-12-05) loosen the screws Demo Description 62 Copyright © Yuejiang Technology Co.
10 DobotPixy Demo Arduino Kit Demo Description Attached figure 7 Issue V2.1 (2019-12-05) Install Pixy vision sensor Demo Description 63 Copyright © Yuejiang Technology Co.
10 DobotPixy Demo Arduino Kit Demo Description Attached figure 8 Install Pixy2 vision sensor For each color, set signature once. Pixy can only set 7 signature labels. Issue V2.1 (2019-12-05) Demo Description 64 Copyright © Yuejiang Technology Co.
10 DobotPixy Demo Arduino Kit Demo Description Attached figure 9 Set signature number Attached figure 10 shows the setting result. Attached figure 10 Issue V2.1 (2019-12-05) Setting result Demo Description 65 Copyright © Yuejiang Technology Co.
10 DobotPixy Demo Arduino Kit Demo Description The Configure page is displayed. Attached figure 11 Issue V2.1 (2019-12-05) Set Data out port Demo Description 66 Copyright © Yuejiang Technology Co.
10 DobotPixy Demo Arduino Kit Demo Description Attached figure 12 Issue V2.1 (2019-12-05) Set Document folder Demo Description 67 Copyright © Yuejiang Technology Co.
Arduino Kit Demo Description 10 DobotPixy Demo Vision Recognition Initialization Process Vision recognition initialization process includes vision area setting, Cartesian coordinates of the cubes setting, image coordinates of the cubes setting, Z-axis coordinate of the pickup area setting, placing position setting, cube height setting, and color signature setting. For details, please see as follows. Issue V2.1 (2019-12-05) Demo Description 68 Copyright © Yuejiang Technology Co.
10 DobotPixy Demo Arduino Kit Demo Description Attached figure 13 Obtain the image coordinates NOTICE The image coordinates of the cube need to be corresponding to the Cartesian coordinates. Otherwise, the rotation matrix will fail to be obtained 。 Issue V2.1 (2019-12-05) Demo Description 69 Copyright © Yuejiang Technology Co.
10 DobotPixy Demo Arduino Kit Demo Description NOTE If the vision recognition effect is poor, you can adjust Signature x range and Camera brightness on the File > Configure > Pixy Parameters(saved on Pixy) tab to improve the accuracy, as shown in Attached figure 14. Attached figure 14 Issue V2.1 (2019-12-05) Adjust range and brightness Demo Description 70 Copyright © Yuejiang Technology Co.
10 DobotPixy Demo Arduino Kit Demo Description Multiplexed I/O Interface Description of V1 Dobot Magician Multiplexed UART Interface Description Attached figure 15 shows the UART interface on the base, Attached table 61 lists the multiplexed I/O description. Attached figure 15 Attached table 61 UART interface Multiplex I/O Description I/O addressing Voltage Level Output PWM Level Input ADC 18 3.3V √ - √ - 19 3.3V √ - √ - 20 3.
10 DobotPixy Demo Arduino Kit Demo Description Attached figure 16 Attached table 62 Peripheral Interface Multiplexed I/O Description I/O addressing Voltage Level Output PWM Level Input ADC 10 5V √ - - - 11 3.3V √ √ √ - 12 3.3V √ - √ √ 13 5V √ - - - 14 3.3V √ √ √ - 15 3.
10 DobotPixy Demo Arduino Kit Demo Description Attached figure 17 Peripheral interface in the Forearm Attached table 63 Multiplexed I/O description I/O addressing Voltage Level Output PWM Level Input ADC 1 3.3V - - √ - 2 12V √ - - - 3 12V √ - - - 4 3.3V √ √ √ - 5 3.3V √ - √ √ 6 3.3V √ √ √ - 7 3.3V √ - √ √ 8 3.3V √ √ √ - 9 3.3V √ - √ √ Issue V2.1 (2019-12-05) Demo Description 73 Copyright © Yuejiang Technology Co.
10 DobotPixy Demo Arduino Kit Demo Description Multiplexed I/O Interface Description of V2 Dobot Magician Multiplexed UART Interface Description Attached figure 18 shows the UART interface on the base, Attached table 64 lists the multiplexed I/O description. Attached figure 18 Attached table 64 UART interface Multiplex I/O Description I/O addressing Voltage Level Output PWM Level Input ADC 18 3.3V √ - - - 19 3.3V - - √ - 20 3.
10 DobotPixy Demo Arduino Kit Demo Description Attached figure 19 Attached table 65 Peripheral Interface Multiplexed I/O Description I/O addressing Voltage Level Output PWM Level Input ADC 10 5V √ - - - 11 3.3V √ √ - - 12 3.3V - - √ - 13 5V √ - - - 14 3.3V √ √ √ - 15 3.
10 DobotPixy Demo Arduino Kit Demo Description Attached figure 20 Peripheral interface in the Forearm Attached table 66 Multiplexed I/O description I/O addressing Voltage Level Output PWM Level Input ADC 1 3.3V - - √ - 2 12V √ - - - 3 12V √ - - - 4 3.3V √ √ - - 5 3.3V - - √ - 6 3.3V √ √ - - 7 3.3V - - √ - 8 3.3V √ √ - - 9 3.3V - - √ √ Issue V2.1 (2019-12-05) Demo Description 76 Copyright © Yuejiang Technology Co.