E-bike dashboard and datalogger, opensource. Firmware for STM32-Nucleo32L4 board.
This is STM32 learning project in early stage, use it at your own risk.
Note: Development is in 'master' branch, don't be surprised for a lot of compilation errors.
- Linux
- tup build system
- Nim language compiler
- GIMP
- ImageMagick
- SEGGER JLink debugger and software
- STM32 CubeMX (optional)
- Microsoft VS code (optional)
- First time build after 'git clone' or after CubeMX code generation run:
$ Tools/configure.sh
$ tup
- Regular builds - just run:
$ tup
- JLink debugger setup for VSCode https://wiki.segger.com/J-Link_Visual_Studio_Code
VS code - it is fast and stable, especially with debugging. Fix not found includes in VS code: https://stackoverflow.com/questions/37522462/visual-studio-code-includepath
- Use 4.7 kOhm resistor from Vdd to Data pin, accordig to specs
- Tested with 3.3V Vdd
https://www.aliexpress.com/item/4000866935030.html
List of working features, mostly:
- Main screen speedo/tacho, rpm bar graph, clock, battery pie chart, odometer.
- FatFs with MicroSD, currently not used
- 2 temperature sensors
- Hall sensor
- ADC sampling for Volt/Ampere meters
- 2 buttons
- Config save to EEPROM
- Change IDE to Vim, configure debugging
- Test FatFs for MicroSD formatted with mkfs.vfat
- GPS
- current sensor (Allegro ACS758 200A bidirectional)
-
Tiny printf() for embedded systems: https://github.com/mpaland/printf
-
SH1122 OLED Display HAL driver: https://github.com/mikhail-tsaryov/SH1122-STM32-HAL-Driver
-
DS18B20 temperature sensor onewire HAL driver: https://github.com/lamik/DS18B20_STM32_HAL
-
SPI MicroSD FatFs code: https://github.com/eziya/STM32_SPI_SDCARD
-
Tup build system: http://gittup.org/tup/manual.html
