Before commiting, please run pre-commit install -t pre-commit -t commit-msg
to install the pre-commit hooks.
This project is a simple web application that communicates with the controller backend to move the Arm.
- node 20.0.0
- npm 9.6.4
VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).
npm install
npm run dev
npm run build
This project aims to build an ESP32 DO IT DEVKIT program that receives instructions from the ArmWar application and controlls the Arm.
To be able to compile and flash the controller, you will need to install the last version of Arduino IDE. The way you install is not important. Simply make sure that you have access to the libraries directory. Depending on the way you installed the IDE, the libraries directory should be located at: ~/Arduino/libraries.
The controller uses the following arduino libraries:
- Adafruit PWM Servo Driver Library [v3.0.1]
- Adafruit BusIO [v1.15.0]
- ESP32_HTTPS_Server [v1.0.0]
You can install those libraries from the library manager of Arduino IDE
You may encounter an issue while trying to compile the project. This compilation error may come from the ESP32_HTTPS_Server library.
Try to use the following fix if you encounter the issue:
Modify the file HTTPConnection.hpp located at "~/Arduino/libraries/ESP32_HTTPS_Server/src". Replace line 9 by the following one.
#include <sha/sha_parallel_engine.h>
This library is used to instantiate an HTTP server. Because of new versions of ESP32 development package of Arduino IDE. This library do not compile anymore.
To be able to connect to wifi with the arm, you must create a "credentials.hpp" file which contains your credentials in the config directory.
An example is provided in the examples directory, simply copy it and replace the values with yours.
ArmWar is using protobuff to generate its communication protocol. This protocol is a way to format data as Json does. The protocol definition is located in a simple .proto file in the protocols directory. With this .proto file, we can generate code for different language to be able to serialize and deserialize data.
To generate the controller code, you have to install Nanopb from https://jpa.kapsi.fi/nanopb/download/. Select the latest linux version. Then, untar the downloaded directory where ever you want. Once this is done, you should add the generator-bin directory of the untar directory to your PATH.
Nanopb is a lightweight implementation of protobuff for C language.
The application uses an npm library of protobuff. This library allows to generate static code for the protocol. (This library is installed when you run npm install)
We wrote a simple script that generates at the right place the code of our protocol for both application and controller. (You must have Nanopb and protobuff from npm installed)
The script is located in the others directory.
TLDR: Only document what is necessary, the code should be self-explanatory.
We're using Robert C. Martin's Clean Code as a reference for our code.
Code should be self-explanatory and comments should be used only when necessary.
This is why for the moment we're documentating only the function, classes, enums... with the Doxygen syntax for the cpp/hpp files.
For the frontend files we're using the JSDoc syntax only when necessary.
The readme acts as the main documentation for the project, and as such should be as complete as possible. A detail documentation/explanation of the frontend will be added in the future.
We're using Semantic Versioning for our versioning.
We'll be using the following format for our versioning: MAJOR.MINOR.PATCH
.
MAJOR
version when you make incompatible API changesMINOR
version when you add functionality in a backwards compatible mannerPATCH
version when you make backwards compatible bug fixes
The realease will be done using Github Releases. For the extension we will be using the tar.gz format.