Jump to content

Recommended Posts

Posted

Hello everyone, 

Is there someone who knows how to let a car running random in a circle with walls 30 cm high. There will be a flashlight in a corner and the car needs to drive to the flashlight point. 
It isn't really hard when you have 2 different motors for steering. But we have a car with a seperate steering wheel like a forklift truck. 

Thankss !! 

Posted

It should be a pretty similar program to the ones for finding the ir beacon. I would suggest you use a couple of array blocks to hold data from the light sensor. Pick a random direction (left or right), lock the steering, drive forward and collect a dozen readings to one array. Back up the same amount as you went forward. Set the steering to opposite lock and repeat into the other array. Whichever has the highest brightness is the direction to head. If no flashlight is detected perhaps steer a random direction to turn 90 degrees and repeat. I guess you will need touch sensor to locate the wall. The light sensor can also do this to give front and back coverage.

Posted

Here's a completely "thinking outside the box" solution:

  1. Mount the light sensor on a motor, which can then scan for the flashlight - without the car even moving.
  2. After finding the direction of the light, have the car move toward it.
8 hours ago, thekitchenscientist said:

I guess you will need touch sensor to locate the wall...

...or a ultrasonic sensor :look:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...