Handles the initialization and execution of either the master or slave mode. More...
#include <Controller.h>
Public Member Functions | |
Controller (bool isSlave) | |
Constructor for the Controller class. | |
void | setup () |
Sets up the master or slave mode based on the given conditions. | |
void | loop () |
Runs the main execution loop for either the master or slave mode. | |
Handles the initialization and execution of either the master or slave mode.
This class determines whether the system should operate as a master or a slave and initializes the appropriate class accordingly.
Controller::Controller | ( | bool | isSlave | ) |
Constructor for the Controller class.
Determines whether the device should act as a master or a slave.
isSlave | A boolean flag indicating whether the device should run in slave mode. |
void Controller::loop | ( | ) |
Runs the main execution loop for either the master or slave mode.
This function should be called continuously in the main program loop.
void Controller::setup | ( | ) |
Sets up the master or slave mode based on the given conditions.
This function initializes the appropriate components depending on whether the device is in master or slave mode.