Software for the Phoenix translating gearbox, using a stepper motor
The main settings and debug options can be configured by changing values of constants defined in include/settings.h
The main functionalities are split between the two ESP32's cores, contained in two files in the src/
folder
core1
: manages the stepper motor, the buttons and limit switchescore0
: manages CAN, the webserver and the interrupts
There are several libraries used by this software (capital letters libraries implement one class):
HR4988
: acts as a software driver for the stepper motor, providing basic function to move the motor interacting with the HR4988 driverFeedbackStepper
: manages the stepper motor at a higher level of abstraction, including feedbacks and buttons managementbutton
: provides basic functions to setup a button or a limit switch as an interruptAS5600
: provides functions to read the magnetic rotative encoder using I2C protocolPotentiometer
: provides functions to read the linear potetiometer through an analog pinWebserver
: manages the creation and the interaction with a server hosted in the ESP to calibrate the gearshift (js
,css
andhtml
sent to the client are inside thedata/
folder)Memory
: manages reading and writing from Flash ESP, in particular gear positionspolicanbent:
manages CAN communication