








{"id":296,"date":"2020-10-20T06:57:17","date_gmt":"2020-10-20T06:57:17","guid":{"rendered":"https:\/\/osoyoo.info\/?p=296"},"modified":"2020-10-20T21:44:13","modified_gmt":"2020-10-20T21:44:13","slug":"arduino-basic-lesson-29-robot-car-line-tracking","status":"publish","type":"post","link":"https:\/\/osoyoo.info\/index.php\/2020\/10\/20\/arduino-basic-lesson-29-robot-car-line-tracking\/","title":{"rendered":"Hardware Programming with Arduino IDE &#8211; Lesson 29 : Robot Car Line Tracking"},"content":{"rendered":"<p><a href=\"https:\/\/osoyoo.info\/index.php\/2020\/10\/20\/arduino-basic-lesson-28-obstacle-avoidance-robot-car\/\"><img loading=\"lazy\" class=\"alignnone\" src=\"https:\/\/osoyoo.com\/picture\/Arduino_Graphical_Programming_Kit\/Previous.png\" alt=\"\" width=\"206\" height=\"59\" \/><\/a> <a href=\"https:\/\/osoyoo.info\/index.php\/2020\/10\/11\/arduino-basic-tutorial-directory\/\"><img loading=\"lazy\" class=\"alignnone\" src=\"https:\/\/osoyoo.com\/picture\/Arduino_Graphical_Programming_Kit\/Tutorial.png\" alt=\"\" width=\"206\" height=\"59\" \/><\/a><\/p>\n<div align=\"center\"><img loading=\"lazy\" class=\"aligncenter size-full\" src=\"https:\/\/osoyoo.com\/picture\/Arduino_Graphical_Programming_Kit\/Authorized_Online_Retailers.png\" width=\"1150\" height=\"56\" \/><\/div>\n<div align=\"center\"><\/div>\n<div align=\"center\">\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"2\">\n<tbody>\n<tr>\n<td>Buy from US<\/td>\n<td>Buy from UK<\/td>\n<td>Buy from DE<\/td>\n<td>Buy from IT<\/td>\n<td>Buy from FR<\/td>\n<td>Buy from ES<\/td>\n<td>Buy from JP<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.amazon.com\/OSOYOO-Programming-Controlled-Mechanical-Educational\/dp\/B08163QYLB\/ref=as_li_ss_tl?keywords=arduino+kit&amp;qid=1577086035&amp;sr=8-10&amp;&amp;linkCode=ll1&amp;tag=osoyoo-20&amp;linkId=03d3fc4c0ddacde6e72868e74f51df64&amp;language=en_US\"><img loading=\"lazy\" class=\"alignnone size-large\" src=\"https:\/\/osoyoo.com\/picture\/icon\/us_buy_now.png\" width=\"150\" height=\"30\" \/><\/a><\/td>\n<td><a href=\"https:\/\/www.amazon.co.uk\/dp\/B08163QYLB\/ref=as_li_ss_tl?ref_=nav_signin&amp;&amp;linkCode=ll1&amp;tag=osoyoo-21&amp;linkId=100d3e2260cacec7910ba471d1a14e4a&amp;language=en_GB\"><img loading=\"lazy\" class=\"alignnone size-large\" src=\"https:\/\/osoyoo.com\/picture\/icon\/uk_buy_now.png\" width=\"150\" height=\"30\" \/><\/a><\/td>\n<td><a href=\"https:\/\/www.amazon.de\/dp\/B08163QYLB\/ref=as_li_ss_tl?ref=myi_title_dp&amp;linkCode=ll1&amp;tag=osoyoo05-21&amp;linkId=b5b682a9eb223e4fb00c18bfa0604e05&amp;language=de_DE\"><img loading=\"lazy\" class=\"alignnone size-large\" src=\"https:\/\/osoyoo.com\/picture\/icon\/de_buy_now.png\" width=\"150\" height=\"30\" \/><\/a><\/td>\n<td><a href=\"https:\/\/www.amazon.it\/dp\/B08163QYLB\/ref=as_li_ss_tl?ref=myi_title_dp&amp;linkCode=ll1&amp;tag=osoyoo01-21&amp;linkId=7e28023235665dc16687428f095136d7&amp;language=it_IT\"><img loading=\"lazy\" class=\"alignnone size-large\" src=\"https:\/\/osoyoo.com\/picture\/icon\/it_buy_now.png\" width=\"150\" height=\"30\" \/><\/a><\/td>\n<td><a href=\"https:\/\/www.amazon.fr\/dp\/B08163QYLB\/ref=as_li_ss_tl?ref=myi_title_dp&amp;ref_=nav_ya_signin&amp;_encoding=UTF8&amp;&amp;linkCode=ll1&amp;tag=osoyoo0b-21&amp;linkId=b64d046d9d9dcfd1a21d58d068b88062&amp;language=fr_FR\"><img loading=\"lazy\" class=\"alignnone size-large\" src=\"https:\/\/osoyoo.com\/picture\/icon\/fr_buy_now.png\" width=\"150\" height=\"30\" \/><\/a><\/td>\n<td><a href=\"https:\/\/www.amazon.es\/dp\/B08163QYLB\/ref=as_li_ss_tl?ref=nav_signin&amp;ref_=nav_ya_signin&amp;_encoding=UTF8&amp;&amp;&amp;linkCode=ll1&amp;tag=osoyoo04-21&amp;linkId=f06db7c77f513ff8707cead3b285b17e&amp;language=es_ES\"><img loading=\"lazy\" class=\"alignnone size-large\" src=\"https:\/\/osoyoo.com\/picture\/icon\/es_buy_now.png\" width=\"150\" height=\"30\" \/><\/a><\/td>\n<td><a href=\"https:\/\/www.amazon.co.jp\/dp\/B08168W3D5?ref=myi_title_dp\"><img loading=\"lazy\" class=\"alignnone size-large\" src=\"https:\/\/osoyoo.com\/picture\/icon\/jp_buy_now.png\" width=\"150\" height=\"30\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p><img loading=\"lazy\" class=\"left aligncenter\" src=\"https:\/\/osoyoo.com\/picture\/Arduino_Graphical_Programming_Kit\/objective.png\" alt=\"\" width=\"1150\" height=\"56\" \/><\/p>\n<p>In this project, we use tracking(black\/white) sensor to design a simple line follower Robot car.<\/p>\n<p>A Line Follower Robot, as the name suggests, is an auto-driving vehicle\u00a0 which follows a black track line printed in white\u00a0 ground.\u00a0 Tracking sensors in the robot keeps checking if the current car location is out of the track. If yes, then car will make a negative movement to draw the robot car back to track.<\/p>\n<p><img loading=\"lazy\" class=\"left aligncenter\" src=\"https:\/\/osoyoo.com\/picture\/Arduino_Graphical_Programming_Kit\/Parts-&amp;-Devices-min.png\" alt=\"\" width=\"1150\" height=\"56\" \/><\/p>\n<ul>\n<li>OSOYOO UNO Board (Fully compatible with Arduino UNO rev.3) x 1<\/li>\n<li>OSOYOO Magic I\/O Shield for Arduino x1<\/li>\n<li>OSOYOO Tracking Sensor Module x1<\/li>\n<li>OSOYOO 3-Pin PNP Cable 10cm x 6<\/li>\n<li>OSOYOO 3-Pin PNP Cable 20cm x 2<\/li>\n<li>OSOYOO 4-Pin PNP Cable 20cm x 1<\/li>\n<li>Acrylic Platform x1<\/li>\n<li>transmission motor with two wheels<\/li>\n<li>USB Cable<\/li>\n<\/ul>\n<p><img loading=\"lazy\" class=\"left aligncenter\" src=\"https:\/\/osoyoo.com\/picture\/Arduino_Graphical_Programming_Kit\/how_to_make.png\" alt=\"\" width=\"1150\" height=\"56\" \/><\/p>\n<p>Install the smart car basic frame work as per Lesson 21\uff0c If you have already completed installation in Lesson 23, just keep it as is.<\/p>\n<p><strong>Step 1:<\/strong>Install the left and right tracking sensor with M3*6 plasctic screws, M3*17 plastic pillars.Make sure that every the potentiometer head is between the gaps at the front side of car chassis so that you get the best sensitivity status:the signal indicate LED light will turn on when sensor is above white ground, and the signal LED will turn off when the sensor is above black track.<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-large\" src=\"https:\/\/osoyoo.com\/picture\/Arduino_Graphical_Programming_Kit\/lesson24\/step1.png\" width=\"1000\" height=\"278\" \/><\/p>\n<p><strong>Step 2:<\/strong>Then connect the left and right tracking sensors to the D2 and D3 port of the Magic I\/O shield with a 3-pin PNP cable as below:<br \/>\n<img loading=\"lazy\" class=\"alignnone size-large\" src=\"https:\/\/osoyoo.com\/picture\/Arduino_Graphical_Programming_Kit\/lesson24\/connection.png\" width=\"1000\" height=\"600\" \/><\/p>\n<p><img loading=\"lazy\" class=\"left aligncenter\" src=\"https:\/\/osoyoo.com\/picture\/Arduino_Graphical_Programming_Kit\/how_to_code.png\" alt=\"\" width=\"1150\" height=\"56\" \/><\/p>\n<h4><span style=\"color: #ff0000;\"><strong>Notice: Shut off your battery or Unplug your power adapter when upload sketch code to Arduino.<\/strong><\/span><\/h4>\n<p>After above installations are completed, connect the Arduino board to your computer using the USB cable. The green power LED (labelled <strong>PWR<\/strong>) should turn on.<\/p>\n<p>You can download the code directly fr0m following link:<\/p>\n<h3><a href=\"https:\/\/osoyoo.info\/upload\/lesson29.zip\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Download the Code<\/strong><\/a><\/h3>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" class=\"left aligncenter\" src=\"https:\/\/osoyoo.com\/picture\/Arduino_Graphical_Programming_Kit\/how_to_play.png\" alt=\"\" width=\"1150\" height=\"56\" \/><\/p>\n<p>In lesson 20, we have learnt how to adjust the sensitivity and use the tracking sensor..<\/p>\n<p>Adjust the sensitivity of tracking sensor modules. Turn on and hold the car and adjust the potentiometer on the tracking sensor with cross screwdriver until you get the best sensitivity status: the signal indicate LED light will turn on when sensor is above white ground, and the signal LED will turn off when the sensor is above black track.<\/p>\n<p>Prepare a black track (the width of the black track is more than 30mm and less than 60mm) in white ground. Please note, the turning angle((bending curve) of track can\u2019t be two sharp(larger than 90 degree). If the turning is too sharp, the car will move out of the track.<\/p>\n<p>Turn on the car and put the middle of tracking sensor module facing over black track, and then the car will move along the black track.<\/p>\n<div align=\"center\"><iframe src=\"https:\/\/www.youtube.com\/embed\/m4LSu3l53q0\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><span style=\"display: inline-block; width: 0px; overflow: hidden; line-height: 0;\" data-mce-type=\"bookmark\" class=\"mce_SELRES_start\">\ufeff<\/span><\/iframe><\/div>\n<p><a href=\"https:\/\/osoyoo.info\/index.php\/2020\/10\/20\/arduino-basic-lesson-28-obstacle-avoidance-robot-car\/\"><img loading=\"lazy\" class=\"alignnone\" src=\"https:\/\/osoyoo.com\/picture\/Arduino_Graphical_Programming_Kit\/Previous.png\" alt=\"\" width=\"206\" height=\"59\" \/><\/a> <a href=\"https:\/\/osoyoo.info\/index.php\/2020\/10\/11\/arduino-basic-tutorial-directory\/\"><img loading=\"lazy\" class=\"alignnone\" src=\"https:\/\/osoyoo.com\/picture\/Arduino_Graphical_Programming_Kit\/Tutorial.png\" alt=\"\" width=\"206\" height=\"59\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Buy from US Buy from UK Buy from DE Buy from IT Buy from FR Buy from ES Buy from JP In this project, we use tracking(black\/white) sensor to design a simple line follower Robot car. A Line Follower Robot, as the name suggests, is an auto-driving vehicle\u00a0 which follows a black track line printed [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":298,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/osoyoo.info\/index.php\/wp-json\/wp\/v2\/posts\/296"}],"collection":[{"href":"https:\/\/osoyoo.info\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/osoyoo.info\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/osoyoo.info\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/osoyoo.info\/index.php\/wp-json\/wp\/v2\/comments?post=296"}],"version-history":[{"count":6,"href":"https:\/\/osoyoo.info\/index.php\/wp-json\/wp\/v2\/posts\/296\/revisions"}],"predecessor-version":[{"id":313,"href":"https:\/\/osoyoo.info\/index.php\/wp-json\/wp\/v2\/posts\/296\/revisions\/313"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/osoyoo.info\/index.php\/wp-json\/wp\/v2\/media\/298"}],"wp:attachment":[{"href":"https:\/\/osoyoo.info\/index.php\/wp-json\/wp\/v2\/media?parent=296"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/osoyoo.info\/index.php\/wp-json\/wp\/v2\/categories?post=296"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/osoyoo.info\/index.php\/wp-json\/wp\/v2\/tags?post=296"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}