Shop OBEX P1 Docs P2 Docs Learn Events
Race Car: Motor to be triggered by light — Parallax Forums

Race Car: Motor to be triggered by light

daraque25daraque25 Posts: 2
edited 2012-04-23 13:14 in BASIC Stamp
Hello There

I am new to Micro Controllers and I am currently working on a small race car that needs to be triggered by light. The car will be at the Start Line and once the overhead lamp of a wooden gantry is turned on, the car must take off. Light levels will change after leaving and motor must remain on until another light source is detected 20 feet away. I currently have a kit that contains a Board of Education and a BS2 Stamp. I was planning on using a phototransistor as the sensor that will engage a small dc motor, but i am currently having problems with the code. I do not know where to begin. Any insight will be greatly appreciated. Thanks in advance

Comments

  • LeonLeon Posts: 7,620
    edited 2012-04-22 08:14
    Get the photo-transistor working first - the collector should go low when the light is on if it is connected properly.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-04-22 09:42
    I think "Robotics with the BOE-Bot" version 3 uses phototransitors in its light following chapter. It's available as a free pdf file.
  • daraque25daraque25 Posts: 2
    edited 2012-04-23 13:14
    Thanks guys. I got the phototransistors working. I used two: one to start under the presence of light and the other to stop. Duane thanks for pointing out the BOE-Bot pdf file. Their programming helped.
Sign In or Register to comment.