Game Instruction
The game is to make Rollman track light through reading the voltage converted by the light collected by three photosensitive sensors on the light follower module via A/D acquisition and judging which sensor collects the strongest light. For example, if the left photosensitive sensor detects the brightest light, Rollman will turn left. If the middle one does, it will go forward or backward depending on the position of the light spot. Check how to make it happen.
Experimental steps
- Connect the two motors to the two interfaces M1 and M2 of the main control board respectively with the connecting lines. From the prospective of the direction of Rollman’s going forward, M1 is connected to the left motor and M2 the right one. Plug the power source into P1 to guarantee sufficient power. Follow the instructions above to mount the photosensitive module. Connect it to S2 port of the main control board.
- Upload Exp8_Rollman_Lightseeking.ino under Rollman\Arduino Code\Exp8_Rollman_Lightseeking to the Rollman.
- Remove the USB cable, switch on the power. Rollman will read the three analogue outputs circularly. If value detected by the left photosensitive sensor is the smallest, Rollman will turn left. If the right one, it will turn right. If the middle one, it will go forward or backward. Otherwise, Rollman will stop.
Extension
With the knowledge learnt, you can try to build something interesting, like a dark passage with a bright LED onside for Rollman to seek.