jcchurch13/Mechaduino-Firmware

Reorganize as an Arduino library

Opened this issue · 1 comments

The Mechaduino firmware should be organized as a library with example sketches, rather than a single monolithic firmware sketch. This would allow Mechaduino to be used as a platform that can adapt to various use-cases.

It is great that the current firmware keeps setup() and loop() so minimal, and does most of the work elsewhere. This makes it easy to add higher-level application-specific code. However it currently requires modifying Mechaduino_01.ino, and so it lacks separation and makes it more difficult to maintain multiple application-specific sketches, or to pull changes when the firmware is improved.

It would be better if the Mechaduino was an Arduino library, allowing it to be included in other sketches. Arduino libraries have an examples folder which would include the current Mechaduino_01.ino as a basic example. Other example sketches could be used for things like auto-tuning, so that the core library wouldn't need to become monolithic.

this is really a good idea and I am doing some works like these.