What should I do if the sorting Dobot don’t run but both programs are running normally and blocks have already been in front of the photoelectric sensor?

Open the blockly module, and run the test program below to check the photoelectric sensor is normal or not. If there’s no barriers in front of photoelectric sensor, the value will be 0; otherwise, the value will be 1.

Photoelectric sensor

Note:

1)If you choose the Interface GP2 in blockly module, and the sensor should be connected onto the Interface GP2 on Dobot arm correspondingly.

2)You can use the spin button on the back of photoelectric sensor to adjust its sensing distance. Clockwise (C.W.) spinning means making the distance longer and anticlockwise spinning means making the distance short. If the data of sensor is always 1 or 0, you can try to deal the problem by slightly spinning it.

Spin-button