User Tools

Site Tools


wiki:diysdrobot

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wiki:diysdrobot [2018/12/03 21:06]
whadmin
wiki:diysdrobot [2019/05/28 11:18] (current)
Line 54: Line 54:
 Book Errata Corrige (CH 10, p. 297): Refer to this drawing to connect in the right way the ground pin of the ultrasonic range finder. Book Errata Corrige (CH 10, p. 297): Refer to this drawing to connect in the right way the ground pin of the ultrasonic range finder.
  
 +{{ :​wiki:​wn_diysdrobot5.png?​nolink&​600 |}}
  
 +====UPLOAD THE SKETCH====
 +
 +From the Github repository you can download the exercise sketch (30_10.11.ino) and open it in the IDE.
 +
 +[[https://​github.com/​whatsnextcode/​diybook/​blob/​master/​sketches/​30_10.11/​30_10.11.ino|Download Sketch]]
 +
 +Code will give our circuit intelligence to become a self-driving robot. The bot will turn right when it detects an obstacle in front of it at a distance of 10 cm. Before it moves forward, it will keep turning until it detects no obstacles within 10 centimeters. You can adjust the speed and the distance in the code as you prefer.
 +
 +====ENJOY !====
 +
 +After compiling and uploading the code, both motors will move forward. Now, try to place your hand in front of the ultrasonic range finder, both motors should stop for 0.5 seconds, then motor A will move forward but motor B will reverse. Both motors will move forward after 0.5 seconds if no obstacle has been detected.
wiki/diysdrobot.txt ยท Last modified: 2019/05/28 11:18 (external edit)