My latest project: a lego mindstorms train crossing:
here is how it works:
- The train comes along the track and is picked up by the ultrasonic sensor that is mounted over the track before the crossing.
- The mindstorms brick starts beeping and the color sensor flashing. A couple of seconds later the gates close.
- When the last car on the train passes the ultrasonic sensor, it wait a about 15 seconds then closes the gates and the beeping and flashing stops.
Here is some more pictures and a video:
I will post a programme file for this project soon.