Esplora Board

Hi,

I am wondering how you can program the Arudino Esplora board to be compatible with limit switches. I am currently making a car with a project group for UCP. We need to make a steering system that moves the car without a steering wheel and we've got the physical system set up right now.

We want to add limit switches behind each front wheel. We want to program the Esplora board to be compatible with the limit switches so when the wheels touch the limit switches, the wheels stop turning in order that the motor we made does not go past its breaking point.

Why is the fact that you are using an Esplora a factor?

The esplora board has a joystick which we need to control the power wheels car

And it is supported AFAIK by the Arduino IDE. There is an Esplora section in this forum:

Doc

What does the fact that the Explora has a joystick have to do with reading switch states?

The bar moving the wheels will be connected to the gear mechanism. The gear mechanism only moves 20-30 degrees to the right or the left. We’re adding limit switches near the wheels to stop the car from turning too sharply to the right or left, and avoid going past the gear mechanism’s breaking point.

This is the way the gear is going to work.

ENG1 Gear.mov (2.28 MB)

The bar moving the wheels will be connected to the gear mechanism. The gear mechanism only moves 20-30 degrees to the right or the left. We're adding limit switches near the wheels to stop the car from turning too sharply to the right or left, and avoid going past the gear mechanism's breaking point.

The fact that you are using an Esplora is completely irrelevant.

How are the switches connected to the Arduino?
How are you reading the switches?
How are you using the switch state information to control the servo position?