Utilities classes for the Zumo Robot

Dependents:   ZumoRobotBluetoothControlled Fsl_Zumo

This library represents some useful code for controlling your Zumo Robot.

ZumoRobotManager.cpp

Committer:
catalincraciun7
Date:
2014-11-13
Revision:
3:b1fde0759c94
Parent:
2:036da44b023e
Child:
4:dcd52a961392

File content as of revision 3:b1fde0759c94:

// Craciun Catalin
//  ZumoRobotManager.cpp
//   © 2014 Catalin Craciun

#ifndef ZumoRobotManagerCpp
#define ZumoRobotManagerCpp

#include "ZumoRobotManager.h"
#include "mbed.h"

Serial console(USBTX, USBRX);

ZumoRobotManager::ZumoRobotManager() {
    
    // Initialising
    this -> velocityX = 0;
    this -> velocityY = 0;
}

ZumoRobotManager::~ZumoRobotManager() {
    
    // Deinitialising
    
}

float ZumoRobotManager::getVelocityX() {

    return this -> velocityX;    
}

float ZumoRobotManager::getVelocityY() {

    return this -> velocityY;
}

void ZumoRobotManager::setVelocityX(float newValue) {
  
    this -> velocityX = newValue;
}

void ZumoRobotManager::setVelocityY(float newValue) {
 
    this -> velocityY = newValue;
}

bool ZumoRobotManager::checkPassword(char toCheck[]) {

    if (toCheck[0] == '8' &&
        toCheck[1] == '1' &&
        toCheck[2] == '1' &&
        toCheck[3] == '1' &&
        toCheck[4] == '$')
        return true;
    
    return false;
}

#endif // ZumoRobotManagerCpp