1 / 6

ENGR 101: Robotics Lecture 7 – Line Following

ENGR 101: Robotics Lecture 7 – Line Following. Outline Line Following The Final Assignment References http://csserver.evansville.edu/~richardson/ Hacker's Hints for the Scribbler Robot PBASIC Programming Guide: Writing Programs BASIC Stamp Syntax and Reference Manual. 1.

pooky
Download Presentation

ENGR 101: Robotics Lecture 7 – Line Following

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ENGR 101: RoboticsLecture 7 – Line Following • Outline • Line Following • The Final Assignment • References • http://csserver.evansville.edu/~richardson/ • Hacker's Hints for the Scribbler Robot • PBASIC Programming Guide: Writing Programs • BASIC Stamp Syntax and Reference Manual 1

  2. Lecture 7 – Line FollowingLine Following Sensors • There are two IR emitter/detector pairs on the bottom of the Scribbler. The IR emitters are both connected to same pin (PIN 3) and must be turned on/off simultaneously. The right detector is connected to pin 4 while the left is connected to pin 5. • The detector pins return either a 1 (black surface) or a 0 (white surface). The following program illustrates reading the detectors. 2

  3. Lecture 7 – Line FollowingLine Following Sensors LineOn PIN 3 LineRt PIN 4 LineLt PIN 5 HIGH LineOn DO DEBUG CLS, HOME IF (LineRt = 1) THEN DEBUG "Right = black" ELSE DEBUG "Right = white" ENDIF DEBUG CR 3

  4. Lecture 7 – Line FollowingLine Following Sensors IF (LineLt = 1) THEN DEBUG "Left = black" ELSE DEBUG "Left = white" ENDIF PAUSE 500 LOOP END 4

  5. Lecture 7 – Line FollowingLine Following Sensors • Notice that we do not modulate the emitted IR like we did with object avoidance. Just turn on the emitters and leave them on. • The line sensors will see light colors as white and dark colors as black. • Line following works best on a smooth, hard surface. 5

  6. Lecture 7 – Line FollowingThe Final Assignment • Program the Scribbler to follow a light while staying confined to an area bounded by a black line and also avoiding obstacles. 6

More Related