Tuesday, April 27, 2010

Integrating the Gate

We've set up the communication between the cars, controllers, and gates. They'll communicate in a circle:

CONTROLLER->duty periods->CAR
CAR->if they won->GATE
GATE->enable/disable based on start/end of race->CONTROLLER

After getting past initialization issues, we now have hit a wall: once you send a packet, you stop receiving. the fix: enable receiving every time you send a packet.

Now all three of the nodes are sending packets in a circle. The actual gate still needs to be built.

I think what we're going to do is have gate effectively enable each of the cars through the controllers. To signal the race start, both controllers will have to press the "select" button. Then, the gate will check that both cars are under the gate (using information from the light sensors on the cars) and once this is verified, it will count down the start of the race with LEDs. Once the race has officially begun, the controllers will be able to send non-zero duty periods to their respective cars, and they'll be able to move. Once one of the cars senses that they have won, it will inform the gate, which will display the winner.

No comments:

Post a Comment