Compare commits

...

2 Commits

Author SHA1 Message Date
1501a7c492 Inclui api en el la src 2024-08-15 11:46:37 -06:00
0e6fa0c037 Nuevas libreria api 2024-08-15 11:23:10 -06:00
3 changed files with 47 additions and 0 deletions

31
lib/api/api.cpp Normal file
View File

@ -0,0 +1,31 @@
#include "api.h"
#include "mm.hpp"
/* TO DO
* Terminar las funciones wallfront, wallright, wallleft
* Definir los pines usados en mm.hpp
*/
bool API::wallFront() {
bool wallfront;
return wallfront;
}
bool API::wallRight() {
bool wallright;
return wallright;
}
bool API::wallLeft() {
bool wallleft;
return wallleft;
}
void API::moveForward(int distance) {
}
void API::turnRight() {
}
void API::turnLeft() {
}

15
lib/api/api.h Normal file
View File

@ -0,0 +1,15 @@
#pragma once
class API {
public:
static bool wallFront();
static bool wallRight();
static bool wallLeft();
static void moveForward(int distance = 1);
static void turnRight();
static void turnLeft();
};

View File

@ -1,6 +1,7 @@
#include <Arduino.h> #include <Arduino.h>
#include "esp32-hal-gpio.h" #include "esp32-hal-gpio.h"
#include "mm.hpp" /* Archivos header ubicados en include/ */ #include "mm.hpp" /* Archivos header ubicados en include/ */
#include <api.h>
void m1handler(); void m1handler();
void m2handler(); void m2handler();