| Package | org.MARS.robot.control |
| Class | public class LineFollowingBrain |
| Inheritance | LineFollowingBrain AbstractElectronicDevice |
| Implements | IController |
IO Port configuration:
0 and 1 - inputs from sensors (0 - left, 1 - right)
2 through 5 - outputs (must be connected directly to the locomotion)
See also
| Method | Defined by | ||
|---|---|---|---|
|
Create a Line Following Brain controller
| LineFollowingBrain | ||
![]() |
Get a certain IO port by its number
| AbstractElectronicDevice | |
|
step():void
A function that is called on every step of the physics engine.
| LineFollowingBrain | ||
| Method | Defined by | ||
|---|---|---|---|
|
leftWheelForward():void
| LineFollowingBrain | ||
|
leftWheelReverse():void
| LineFollowingBrain | ||
|
rightWheelForward():void
| LineFollowingBrain | ||
|
rightWheelReverse():void
| LineFollowingBrain | ||
| Constant | Defined by | ||
|---|---|---|---|
| LEFT_SENSOR_PORT : Number = 0 [static]
| LineFollowingBrain | ||
| RIGHT_SENSOR_PORT : Number = 1 [static]
| LineFollowingBrain | ||
| LineFollowingBrain | () | constructor |
public function LineFollowingBrain()Create a Line Following Brain controller
| leftWheelForward | () | method |
protected function leftWheelForward():void
| leftWheelReverse | () | method |
protected function leftWheelReverse():void
| rightWheelForward | () | method |
protected function rightWheelForward():void
| rightWheelReverse | () | method |
protected function rightWheelReverse():void
| step | () | method |
public function step():voidA function that is called on every step of the physics engine. It reads the sensors' input and reverses the motors whenever needed.
| LEFT_SENSOR_PORT | constant |
public static const LEFT_SENSOR_PORT:Number = 0
| RIGHT_SENSOR_PORT | constant |
public static const RIGHT_SENSOR_PORT:Number = 1