|Buy from US||Buy from UK||Buy from DE||Buy from IT||Buy from FR||Buy from ES|
cd osoyoo-robot/ wget http://osoyoo.com/driver/lf-tank.tar.gzNote: Above commands will download sample code file to osoyoo-robot/lf directory STEP2: Extract sample code file. tar -zxvf lf-tank.tar.gz cd lf Step 3: Test Black/White Tracking sensors There are 5 black/white tracking sensors in the forehead of the car. Each sensor has two LED lights . The red LED indicates power. The green LED indicates black/white. When black is detected, Green LED will turn off and a "1" will be sent to Raspberry Pi GPIO pin, otherwise LED will ON and a "0" will be sent. * To make sensors working properly, you need use a screw driver to adjust the sensitivity screw on each sensor and make sure Green LED will ON when it is over White and Off when it is over Black. Following python code and experiment will tell you if the sensors are installed correctly. First, put a 2 cm black track on white ground, then put your car over the track and turn on battery. Next, use SSH to connect your Raspberry Pi remotely from your PC(use Putty if you are using Windows), and type following terminal command: sudo python test.py When your put the first sensor(from right) on the black track, the green LED will turn off and your will see Putty terminal window show 00001 as following: This means Raspberry Pi detected WHITE(0) from 4 sensors in the left and Black(1) from the right edge sensor. You can change the position of the black track from right to left sensors one by one and make the result change from 00001 to 00010,00100,01000,10000.If your result is not showed as above, you might need to double check if the sensor sensitivity and connection to the Pi is correct.
DownLoad Url osoyoo.com