Add endstops, light_sensor, test, many fixes

- Added endstop and light_sensor module
 - Improved configuration by splitting wiring configs to boards.h
 - Added a unit test for argument parsing
 - Fixed many smaller bugs
This commit is contained in:
Filip Ayazi 2021-05-25 01:40:09 +01:00
parent 8f66bb7da9
commit 35d969aadd
16 changed files with 875 additions and 64 deletions

View file

@ -1,8 +1,8 @@
# Firmware code for the sangaboard
*This firmware is Work in Progress and has not reached feature parity with the original yet (see below for more details)*
*This firmware is Work in Progress and while it should now support all features of the original, many features are untested.*
Firmware for the control board of OpenFlexure Microscope. This is a refactor of the [original arduino code](https://gitlab.com/bath_open_instrumentation_group/sangaboard/-/blob/master/arduino_code/README.md) with some improvements to the infrastructure and features.
Firmware for the control board of OpenFlexure Microscope. This is a refactor of the [original arduino code](https://gitlab.com/bath_open_instrumentation_group/sangaboard/-/blob/master/arduino_code) with some improvements to the infrastructure and features.
## Notable changes
This version of the firmware uses PlatformIO rather than Arduino IDE.
@ -11,6 +11,8 @@ The code is split into the main part which mostly handles command parsing and mo
Motor moves now do not block command processing and a new command `stop` was added which aborts any move in progress.
The firware can be build against different platforms (pi pico, stm32). `boards.h` contains wiring configuration which will need to be adjusted when used with a custom board.
## Hardware
Currently works on Arduino Nano + Sangaboard v0.2. Other platforms might work with appropriate `platform.ini` and `config.h` changes and will be supported in due course.
@ -18,14 +20,22 @@ Currently works on Arduino Nano + Sangaboard v0.2. Other platforms might work wi
## TODO list
### Original firmware feature parity
- [ ] Implement Endstops module
- [ ] Implement Light sensor modules
- [ ] Handle Sangaboardv3
- [x] Implement Endstops module
- [x] Implement Light sensor modules
- [x] Handle Sangaboardv3
### Testing
- [ ] Ensure responses to commands match the original version
- [ ] Test endstop modules
- [ ] Test Light sensor module
- [ ] Test on different platforms
### Improvements and fixes
- [ ] Add a CI script
- [ ] Add tests (argument parsing)
- [x] Add test for argument parsing
- [ ] Add more unit tests
- [ ] Test automatic building and upload
- [ ] Support other platforms
- [ ] Clean up some of the messier bits
- [x] Support other platforms
- [ ] Clean up
- [ ] Improve handling of unused modules/libraries
- [ ] Lower RAM use