GetIRSwitch - API - Dobot Magician


#1

Hi everybody,
I’m trying to use IR sensor on the belt kit of dobot magician. Using Dobot Studio everything goes well ( IR sensor connecte to GP4 ( forearm ) and even to GP1 ( back) .
When I use Dobot API command GetIRSwitch and Dobot_SetIRSwitch, the GetIR Switch function return always 1, .
I wrote this script in loop function to test:

Dobot_SetIRSwitch(1,0);
Serial.println(GetIRSwitch(0));

I tried to change the port number with 0,1,2,3 but it was returned always 1.

Could you help me please?
Thanks!
Mauro