energy-analyzer net type.
Import
Methods
Method Reference
Net.get(name, type=NetType.EnergyAnalyzer)
Get an energy analyzer net by name.
Returns: Energy analyzer Net instance
read_energy(duration)
Integrate current and power over duration seconds.
Returns:
dict with keys:
read_stats(duration)
Compute mean, minimum, maximum, and standard deviation for current, voltage, and power over duration seconds.
Returns:
dict with keys:
Each statistics sub-dict contains:
Examples
Energy Budget Check
Sleep Current Verification
Battery Life Estimation
Startup Energy Capture
Current Spike Analysis
Supported Hardware
For instantaneous power readings (also available on Yocto-Watt), see Watt Meter.
Notes
- The Joulescope JS220 samples at high frequency; longer durations yield more accurate statistics
- The Nordic PPK2 operates in source mode (supplies a configurable voltage 0.8–5V and measures current); voltage readings reflect the configured value
read_energy()andread_stats()block for the fulldurationbefore returning- The same physical JS220 device is shared between
WattMeterandEnergyAnalyzernet roles — opening both net types for the same device is safe - Use
lager instruments --box <box>to verify the JS220 is detected before running scripts

