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
56
Attached table 54 Get the IR sensor value
Common Function of Arduino
Arduino demo is developed based on Arduino Mega2560 and the Arduino APIs need to be
called. This topic describes the common functions that are used in Arduino demo.
Attached table 55 Set the specified pin to INPUT or OUTPUT
Description
Set the IR sensor
Parameter
enable: 0:Disabled, 1:Enabled
port: the Dobot interface that the IR sensor is connected to. Please select the
corresponding interface
Details for port
:
enum
{
IF_PORT_GP1;
IF_PORT_GP2;
IF_PORT_GP4;
IF_PORT_GP5;
};
Return
None
Prototype
uint8_t GetIRSwitchEx( uint8_t port)
Description
Get the IR sensor value
Parameter
port: the Dobot interface that the IR sensor is connected to. Please select the
corresponding interface
Details for port
:
enum
{
IF_PORT_GP1;
IF_PORT_GP2;
IF_PORT_GP4;
IF_PORT_GP5;
};
Return
Return the IR sensor value
Prototype
void pinMode(uint8_t pin, uint8_t mode)
Description
Set the specified digital pin to INPUT or OUTPUT
Parameter
pin: Pin number of the pin
mode: INPUT or OUTPUT