commit ba0b19560f3fbd276a220b709b23937646eff385 Author: Fisch Date: Mon Mar 28 20:04:44 2022 +0200 inital library setup diff --git a/README.md b/README.md new file mode 100644 index 0000000..bb5721c --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# Library to control hoverboard-firmware-hack-foc-serial-esc + +When using https://gitea.ctdo.de/interfisch/hoverboard-firmware-hack-foc-serial-esc this library is used to send commands to the hoverboard PCB. + diff --git a/src/hoverboard-esc-serial-comm.cpp b/src/hoverboard-esc-serial-comm.cpp new file mode 100644 index 0000000..5d9ed73 --- /dev/null +++ b/src/hoverboard-esc-serial-comm.cpp @@ -0,0 +1,10 @@ +#include "hoverboard-esc-serial-comm.h" + +ESCSerialComm::ESCSerialComm() { //constructor + +} + +void ESCSerialComm::update(long millis, boolean state) //example function +{ + //Do stuff +} \ No newline at end of file diff --git a/src/hoverboard-esc-serial-comm.h b/src/hoverboard-esc-serial-comm.h new file mode 100644 index 0000000..0e3fdba --- /dev/null +++ b/src/hoverboard-esc-serial-comm.h @@ -0,0 +1,19 @@ +#ifndef ESCSERIALCOMM_H +#define ESCSERIALCOMM_H + +#include + +#define SERIAL_CONTROL_BAUD 115200 // [-] Baud rate for HoverSerial (used to communicate with the hoverboard) +#define SERIAL_BAUD 115200 // [-] Baud rate for built-in Serial (used for the Serial Monitor) +#define START_FRAME 0xABCD // [-] Start frme definition for reliable serial communication + + +class ESCSerialComm +{ + public: + ESCSerialComm(); //constructor + void update(long millis, boolean state); //declare example function + private: + long _millis_lastinput; //declare private variable +}; +#endif \ No newline at end of file