bChange
Dependencies: TextLCD
Diff: main.cpp
- Revision:
- 8:0719ca2421b4
- Parent:
- 7:3fc517224e66
--- a/main.cpp Wed Jul 29 02:24:28 2020 +0000 +++ b/main.cpp Wed Jul 29 02:32:43 2020 +0000 @@ -29,8 +29,8 @@ void bChange(){ lcd.setBacklight(TextLCD::LightOn); while(true){ - double test = battery.read(); - b = (int)(((test* 3.3 - MIN_V)/0.67)*10+0.5)*10; + //double test = battery.read(); + b = (int)(((battery.read() * 3.3 - MIN_V)/0.67)*10+0.5)*10; //b = (int)(((test*3.3 - MIN_V))/(MAX_V) + 0.5)*10; pc.printf("test*3.3=%f,b = %d\r\n",test*3.3,b); if(b < 0){//すべての機能停止