SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
11.
Google
Project Volta&Battery Historian
● Project Volta
○ Android5.0で導入されたバッテリーのもちをよくするた
めの各種仕組みとAPI群
https://developer.android.com/about/versions/android-5.0.html#Power
● Battery Historian
○ Project Voltaで導入された電源関連の統計情報を取得
し、整形して分析しやすくするツール
https://github.com/google/battery-historian
19.
Arduino用スケッチ(抜粋)
INA226との通信は
オレ工房様のスケッチを利用
http://ore-kb.net/archives/150
シリアル出力部分を、受け側プ
ログラムに合わせて改変して使
用させていただきました。
約5msごとにデータ取得します
https://github.com/oho-sugu/powermeter
void setup()
{
Wire.begin();
Serial.begin(115200);
setupRegister();
}
char buf[64];
unsigned short voltage; // Bus Voltage (mV)
unsigned short current; // Current (mA)
unsigned short power; // Power (uW)
unsigned long time; // time (ms)
void loop()
{
voltage = (unsigned short)readRegister(INA226_REG_BUS_VOLTAG
current = (unsigned short)readRegister(INA226_REG_CURRENT);
power = (unsigned short)readRegister(INA226_REG_POWER);
time = millis();
snprintf(buf, NELEMS(buf)
, "T%lxV%xI%xP%xn"
, time
, voltage
, current
, power
);
Serial.print(buf);
delay(5);
}