diff --git a/lib/api/api.cpp b/lib/api/api.cpp new file mode 100644 index 0000000..1a042b6 --- /dev/null +++ b/lib/api/api.cpp @@ -0,0 +1,30 @@ +#include "api.h" + +/* 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() { +} diff --git a/lib/api/api.h b/lib/api/api.h new file mode 100644 index 0000000..1211a5c --- /dev/null +++ b/lib/api/api.h @@ -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(); + +}; diff --git a/src/main.cpp b/src/main.cpp index c5bf0d3..ba8643b 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,5 +1,6 @@ #include #include "esp32-hal-gpio.h" +#include #include "mm.h" /* Archivos header ubicados en include/ */ void m1handler();