Maze_Solver  1.0
A Maze Solver Algorithm for BotnRoll ONE A
Robot Class Reference

#include <Robot.h>

Public Member Functions

 Robot ()
 creates an instance of the class Robot More...
 
void init ()
 Configures the robot to be used with Bot'n Roll One. More...
 
bool areThereObstacles ()
 Reads IR obstacles sensors and sends commands to motors avoiding obstacles. More...
 
void sendToMotors (MoveType robotMove, char lineSignature)
 Sends commands to motors. More...
 
void EEPROMWriteInt (int p_address, int p_value)
 Writes an integer to the EEPROM. More...
 
unsigned int EEPROMReadInt (int p_address)
 Reads an integer from the EEPROM. More...
 
void writeEEPROM ()
 Reads all the saved values from the EEPROM (e.g. speed and other parameters) More...
 
void readEEPROM ()
 Stores all the relevant values on the EEPROM (e.g. speed and other parameters) More...
 
void readQTR8A (unsigned int *line)
 Read the calibrated line Sensor. More...
 
int readLineSensors (unsigned int *sensor_values)
 Read the line Sensor. More...
 
void Menu ()
 Launches the Menu for User Interface. More...
 

Public Attributes

BnrOneA _one
 the interface to the Bot'n Roll One A More...
 
int _speed
 the reference speed of the robot More...
 
int _leftWheelSpeed
 the left wheel speed More...
 
int _rightWheelSpeed
 the right wheel speed More...
 
bool _debug
 when true sends debug messages to LCD/Serial interface More...
 
int _pause
 the pause in milliseconds for 90º fixed turnings More...
 
NonLinearControl _nonLinearControl
 Non-linear control values. More...
 

Constructor & Destructor Documentation

Robot::Robot ( )

creates an instance of the class Robot

Member Function Documentation

bool Robot::areThereObstacles ( )

Reads IR obstacles sensors and sends commands to motors avoiding obstacles.

Returns
true if obstacles detected, false otherwise
unsigned int Robot::EEPROMReadInt ( int  p_address)

Reads an integer from the EEPROM.

Parameters
p_addressthe address from where the value is to be read from
Returns
the value read
void Robot::EEPROMWriteInt ( int  p_address,
int  p_value 
)

Writes an integer to the EEPROM.

Parameters
p_addressthe address where the value is to be written
p_valuethe value to be written
void Robot::init ( )

Configures the robot to be used with Bot'n Roll One.

Reads saved configuration values (e.g. speed and other parameters) from the EEPROM Writes a welcome message to the LCD Launches the Menu

void Robot::Menu ( )

Launches the Menu for User Interface.

void Robot::readEEPROM ( )

Stores all the relevant values on the EEPROM (e.g. speed and other parameters)

int Robot::readLineSensors ( unsigned int *  sensor_values)

Read the line Sensor.

void Robot::readQTR8A ( unsigned int *  line)

Read the calibrated line Sensor.

void Robot::sendToMotors ( MoveType  robotMove,
char  lineSignature 
)

Sends commands to motors.

Parameters
robotMovethe type of movement to be performed
void Robot::writeEEPROM ( )

Reads all the saved values from the EEPROM (e.g. speed and other parameters)

Member Data Documentation

bool Robot::_debug

when true sends debug messages to LCD/Serial interface

int Robot::_leftWheelSpeed

the left wheel speed

NonLinearControl Robot::_nonLinearControl

Non-linear control values.

BnrOneA Robot::_one

the interface to the Bot'n Roll One A

int Robot::_pause

the pause in milliseconds for 90º fixed turnings

int Robot::_rightWheelSpeed

the right wheel speed

int Robot::_speed

the reference speed of the robot


The documentation for this class was generated from the following files: