It may sound strange, but in many devices the most time-consuming task is interface prototyping and polishing. Good news is, there exist embedded GUI libs with desktop support. If you design application properly, you can do almost everything on PC, without real hardware at all. That reduces development and debugging time in x10 times and more.
I selected LittlevGL. It's not ideal, but can work on MCUs with small memory.
As perfectionist, i don't like compromises about quality. So, to make LVGL "useable", i had to design new storage format for bitmap fonts and create appropriate font convertor. Here is the result:
This tool properly uses kerning, autohinting and allows create nice texts on display. See animated demo above. Now you can just take TTF or WOFF font, and convert it for embedded use without quality loss. Of cause, convertor allows merge multiple fonts, select subsets and so on. Data format is universal and not limited to LVGL only.
Lets return to dispenser interface. As you can see on image, it has 3 "screens":
- "Dose" in this mode, dispense button click produces fixed portion of selected volume.
- "Flow" mode - dispenser works until you keep button pressed.
- "Settings" - setup hardware options, needed to calculate optimal dispensing speed.
Controls is done with 5-way tactile switch + dispense button:
- up/down - move selector position
- left/right (settings only) - change selected value
- short "enter" - switch between modes (dose/flow), long "enter" - go to settings.
Seems convenient. Next step is to ask designer draw everything "properly".
Source code with current progress available on github: https://github.com/puzrin/dispenser. If you need more details about abstracting hardware, you can find those there.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.