23. februar 2011

23-02-11 Gate version 2.2

Emir and Jakob tried to make a new design of the Gate. Both gate- and software wise.
 After considering how to make the design better, we tried to cut off some weight. We added a red light so it would glow red when the gate was opened. We came up with this design:

Jakob have some experience with “State machines” and “thread programming”. Therefore we decided to make the gate control in one thread and sensor input in another tread.
The sensor input will be a “command thread”, and the other will be a “Gate control thread”.
The sensor can man make two commands:
  • The gate should be open
  • The gate should be close

We made the gate a “State machine”. The two states are:
  • Gate is closed
  • Gate is open

The program overview looks like this:


The idea of the design is:

“The gate is normally closed and the light is off. When a car (from the factory) comes in the distance of 10 cm the gate will open, and the light will turn on. When the car is more than 20 cm away from the gate, the gate will close.”

- Jakob

Ingen kommentarer:

Send en kommentar