bChange
Dependencies: TextLCD
Diff: main.cpp
- Revision:
- 5:a0ebf165abb1
- Parent:
- 4:207de1651f4f
- Child:
- 6:1545ad4c64e6
--- a/main.cpp Wed Jul 29 01:10:07 2020 +0000 +++ b/main.cpp Wed Jul 29 01:11:13 2020 +0000 @@ -7,7 +7,7 @@ #include "TextLCD.h" #define MIN_V 2.0 #define MAX_V 2.67 -//0.107 +//0.107 2.23,3.3 I2C i2c_lcd(p28, p27); TextLCD_I2C lcd(&i2c_lcd, (0x27 << 1), TextLCD::LCD16x2, TextLCD::HD44780); @@ -29,7 +29,7 @@ void change(){ lcd.setBacklight(TextLCD::LightOn); while(true){ - b = (int)((battery.read()* MAX_V - MIN_V)/0.107 + 0.5)*10; + b = (int)((battery.read()* MAX_V - MIN_V)/0.67 + 0.5)*10; if(b < 0){//すべての機能停止 lcd.setBacklight(TextLCD::LightOff); bTimer.stop();