J’ai repris un morceau de code de Janpom pour faire une moniteur de cellules pour les Smart BMS LLT / JBD avec un écran ILI9225.
J’ai principalement adapté le code pour qu’il fonctionne sur un STM32 au lieu d’un Arduino et j’ai ajouté un indicateur pour les cellules en train d’être équilibrées. (et j’ai viré les delay(), je déteste cette commande )
smart_bms_display.ino
//#define DEV_MODE 1
#include <TFT_22_ILI9225.h>
#include "tft_util.h"
#define TFT_RST PA1
#define TFT_RS PA2
#define TFT_CS PA0 // SS
#define TFT_SDI PA7 // MOSI
#define TFT_CLK PA5 // SCK
This file has been truncated. show original
tft_util.cpp
/*
Copyright 2018 Jan Pomikalek <jan.pomikalek@gmail.com>
This file is part of the DAVEga firmware.
DAVEga firmware is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This file has been truncated. show original
tft_util.h
/*
Copyright 2018 Jan Pomikalek <jan.pomikalek@gmail.com>
This file is part of the DAVEga firmware.
DAVEga firmware is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This file has been truncated. show original
5 « J'aime »