Driver for Me line follwer device.
More...
#include <src/MeLineFollower.h>
Driver for Me line follwer device.
Class: MeLineFollower
- Description
- Declaration of Class MeLineFollower.
- Copyright (C), 2012-2016, MakeBlock
◆ MeLineFollower() [1/2]
| MeLineFollower::MeLineFollower |
( |
void |
| ) |
|
Alternate Constructor which can call your own function to map the line follwer device to arduino port, no pins are used or initialized here.
- Parameters
-
◆ MeLineFollower() [2/2]
| MeLineFollower::MeLineFollower |
( |
uint8_t |
port | ) |
|
Alternate Constructor which can call your own function to map the line follwer device to arduino port
- Parameters
-
| [in] | port | - RJ25 port from PORT_1 to M2 |
◆ readSensor1()
| bool MeLineFollower::readSensor1 |
( |
void |
| ) |
|
- Function
- readSensor1
- Description
- Get the sensors1(left sensors) state.
- Output
- None
- Returns
- 0: sensor1 is inside of black line
1: sensor1 is outside of black line
- Others
- None
◆ readSensor2()
| bool MeLineFollower::readSensor2 |
( |
void |
| ) |
|
- Function
- readSensor2
- Description
- Get the sensors2(right sensors) state.
- Output
- None
- Returns
- 0: sensor1 is inside of black line
1: sensor1 is outside of black line
- Others
- None
◆ readSensors()
| uint8_t MeLineFollower::readSensors |
( |
void |
| ) |
|
- Function
- readSensors
- Description
- Get the sensors state.
- Output
- None
- Returns
- (0x00)-S1_IN_S2_IN: sensor1 and sensor2 are both inside of black line
(0x01)-S1_IN_S2_OUT: sensor1 is inside of black line and sensor2 is outside of black line
(0x02)-S1_OUT_S2_IN: sensor1 is outside of black line and sensor2 is inside of black line
(0x03)-S1_OUT_S2_OUT: sensor1 and sensor2 are both outside of black line
- Others
- None
◆ setpin()
| void MeLineFollower::setpin |
( |
uint8_t |
Sensor1, |
|
|
uint8_t |
Sensor2 |
|
) |
| |
- Function
- setpin
- Description
- Reset the line follwer device available PIN by its arduino port.
- Parameters
-
| [in] | Sensor1 | - arduino port(should digital pin) |
| [in] | Sensor2 | - arduino port(should digital pin) |
- Output
- None
- Returns
- None
- Others
- None
The documentation for this class was generated from the following files: