Android Question How to read the phone's instantaneous current consumption from code?

amorosik

Expert
Licensed User
I see that API 21 has a feature that allows you to read the phone's instantaneous power consumption
How to use this function in B4A environment?
I ask this because using the GPS features I see that the power absorption is not homogeneous
And I would like to understand exactly the power consumption depending on the program code, in order to optimize a position tracking app as best as possible
 
Last edited:
Solution
This is the code that ChatGPT generated - see if it works:
B4X:
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
    Dim jo As JavaObject
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Initialize the JavaObject
    jo.InitializeContext
  
    'Get the BatteryManager service
    Dim batteryManager As JavaObject
    batteryManager = jo.RunMethod("getSystemService", Array As Object("batterymanager"))
  
    'Define the BATTERY_PROPERTY_CURRENT_NOW constant
    Dim BATTERY_PROPERTY_CURRENT_NOW As Int = 2 'The actual value might be different. Check the Android documentation for the correct value.
  
    'Retrieve the current...

JohnC

Expert
Licensed User
Longtime User
Please provide a link to the details of that API routine.
 
Upvote 0

amorosik

Expert
Licensed User
Upvote 0

JohnC

Expert
Licensed User
Longtime User
This is the code that ChatGPT generated - see if it works:
B4X:
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
    Dim jo As JavaObject
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Initialize the JavaObject
    jo.InitializeContext
  
    'Get the BatteryManager service
    Dim batteryManager As JavaObject
    batteryManager = jo.RunMethod("getSystemService", Array As Object("batterymanager"))
  
    'Define the BATTERY_PROPERTY_CURRENT_NOW constant
    Dim BATTERY_PROPERTY_CURRENT_NOW As Int = 2 'The actual value might be different. Check the Android documentation for the correct value.
  
    'Retrieve the current battery property
    Dim currentNow As Int
    currentNow = batteryManager.RunMethod("getIntProperty", Array As Object(BATTERY_PROPERTY_CURRENT_NOW))
  
    'Display the current battery property
    Log("Current Battery: " & currentNow & " µA")
  
End Sub
 
Last edited:
Upvote 0
Solution

JohnC

Expert
Licensed User
Longtime User
Did the code work?
 
Upvote 0

amorosik

Expert
Licensed User
I'm tryng this code
But it doesn't seem to correspond to reality
I'm trying increasing and decreasing the brightness of the display, and turning the flashlight on and off, which I believe is one of the main causes of current absorption
But the values returned by currentNow do not seem to correspond to reality
Even the sign, negative or positive, I would expect to see it change when I insert the charging cable, but this is not always the case
Same result, disappointing, on Andoid 5.02 (Samsung tablet), Android 6.0.1 (Cat S60), Android 11 (BlackView 6600)

B4X:
#Region  Project Attributes
    #ApplicationLabel: B4A Example
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: portrait
    #CanInstallToExternalStorage: False
#End Region

#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: True
#End Region

'#BridgeLogger: True

Sub Process_Globals
    Public ActionBarHomeClicked As Boolean
    Public timer1sec As Timer
    Public jo As JavaObject
End Sub

Sub Globals

End Sub

Sub Activity_Create(FirstTime As Boolean)
    Dim pm As B4XPagesManager
    pm.Initialize(Activity)
    
    'Initialize the JavaObject
    jo.InitializeContext

    timer1sec.Initialize("tmr1sec",1000)
    timer1sec.Enabled=True
End Sub

Sub tmr1sec_Tick
    'Get the BatteryManager service
    Dim batteryManager As JavaObject
    batteryManager = jo.RunMethod("getSystemService", Array As Object("batterymanager"))
 
    'Define the BATTERY_PROPERTY_CURRENT_NOW constant
    Dim BATTERY_PROPERTY_CURRENT_NOW As Int = 2 'The actual value might be different. Check the Android documentation for the correct value.
 
    'Retrieve the current battery property
    Dim currentNow As Int
    currentNow = batteryManager.RunMethod("getIntProperty", Array As Object(BATTERY_PROPERTY_CURRENT_NOW))
    
    'Display the current battery property
    Log("Current Battery: " & currentNow & " uA")
End Sub

'Template version: B4A-1.01
#Region Delegates

Sub Activity_ActionBarHomeClick
    ActionBarHomeClicked = True
    B4XPages.Delegate.Activity_ActionBarHomeClick
    ActionBarHomeClicked = False
End Sub

Sub Activity_KeyPress (KeyCode As Int) As Boolean
    Return B4XPages.Delegate.Activity_KeyPress(KeyCode)
End Sub

Sub Activity_Resume
    B4XPages.Delegate.Activity_Resume
End Sub

Sub Activity_Pause (UserClosed As Boolean)
    B4XPages.Delegate.Activity_Pause
End Sub

Sub Activity_PermissionResult (Permission As String, Result As Boolean)
    B4XPages.Delegate.Activity_PermissionResult(Permission, Result)
End Sub

Sub Create_Menu (Menu As Object)
    B4XPages.Delegate.Create_Menu(Menu)
End Sub

#if Java
public boolean _onCreateOptionsMenu(android.view.Menu menu) {
     processBA.raiseEvent(null, "create_menu", menu);
     return true;
    
}
#End If
#End Region

'Program code should go into B4XMainPage and other pages.
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
What were some of the current readings in the log?

Also, I think a minus means it's showing the current while running on battery, and a positive number if the current when charging.
 
Upvote 0

amorosik

Expert
Licensed User
What were some of the current readings in the log?

Also, I think a minus means it's showing the current while running on battery, and a positive number if the current when charging.

Yes, of course, it should be like this
But if you try to load the example above you'll see that it doesn't
 

Attachments

  • B4A.zip
    12.9 KB · Views: 23
Upvote 0

JohnC

Expert
Licensed User
Longtime User
I'm curious what the actual values are to see if they are within a 100ma to 1200ma range - so what are some of the readings?

Does it return a fixed value, or does the value vary?
 
Upvote 0

amorosik

Expert
Licensed User
Small variations, even using the flashlight on/off
And a negative sign even with the charger inserted

B4X:
Current Battery: -104674 uA
Current Battery: -104674 uA
Current Battery: -104674 uA
Current Battery: -104674 uA
Current Battery: -104674 uA
Current Battery: -104674 uA
Current Battery: -104674 uA
Current Battery: -104674 uA
Current Battery: -104674 uA
Current Battery: -104674 uA
Current Battery: -104674 uA
Current Battery: -104674 uA
Current Battery: -112304 uA
Current Battery: -112304 uA
Current Battery: -112304 uA
Current Battery: -112304 uA
Current Battery: -112304 uA
Current Battery: -112304 uA
Current Battery: -110625 uA
Current Battery: -110625 uA
Current Battery: -110625 uA
Current Battery: -110625 uA
Current Battery: -110625 uA
Current Battery: -110625 uA
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
OK, so you get ma (milliamps) by dividing those values by 1000.

So, its reporting around 104ma - 112ma - that sounds about normal.

If the battery level is less than 99% (so there is room to charge), then when you plug in the charger, what type of values does it report?
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
Also, running the camera app and viewing the live preview screen will draw a LOT of current - so that should exceed 250ma.
 
Upvote 0

amorosik

Expert
Licensed User
OK, so you get ma (milliamps) by dividing those values by 1000.

So, its reporting around 104ma - 112ma - that sounds about normal.

If the battery level is less than 99% (so there is room to charge), then when you plug in the charger, what type of values does it report?

No it's not normal, because i switch flashlight on and off, and the Current Battery value does not change with the (presumed) real consumption
And it's not normal that Current Battery has a minus sign, with battery charger and without
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
The LED for the camera will not cause the current to change much, so don't use that as a test.

When you run the camera app and the live preview is actively being displayed on the screen, then that will draw a lot of current.

I also wouldn't count the negative not turning to positive when charging as a test either, because maybe the current value will always be negative even during charging and they you need to call another API to detect if the battery is being charged (as a boolean value).

So, try running the camera (not just the camera LED) with the live preview being displayed and see if the current value is much higher.
 
Upvote 0

amorosik

Expert
Licensed User
The LED for the camera will not cause the current to change much, so don't use that as a test.

When you run the camera app and the live preview is actively being displayed on the screen, then that will draw a lot of current.

I also wouldn't count the negative not turning to positive when charging as a test either, because maybe the current value will always be negative even during charging and they you need to call another API to detect if the battery is being charged (as a boolean value).

So, try running the camera (not just the camera LED) with the live preview being displayed and see if the current value is much higher.

An app that consumes more than the flashlight LED or the display backlight?
I do not think I think the things that consume the most are:
- display lighting
- the functioning of the GPS
- the flashlight on your phone

I'm not sure in what order, but I don't think an app can overcome these features in terms of power consumption.
What references do you have to affirm what you wrote above?
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
There are problems with the other items you mentioned:

1) Display lighting - how much current it draws depends on if you have LCD or OLED and when the display turns off (where you would expect a significant drop in current), the phone will probably go to sleep, so your app wont be running to log the current usage.
2) GPS - GPS is designed to run in the background and periodically, so it's current use is not constant.
3) The flashlight LED will draw about 200ma, but other things can be going on in the phone to cancel out some of the current - so the current may not jump as much as 200ma when it's on.

Why don't you want to run the camera in live preview mode and see for yourself how much more current it draws (it should draw up to 500ma)?

If my info on current is not helpful to you, I understand, but at least I was able to help you use the API you wanted to use :)
 
Upvote 0

amorosik

Expert
Licensed User
You're right, camera is up to 500 mA, termocamera (is a Cat S60) is up to 1A
It is important to note that from the moment of the real change in absorption, the value changes only after a few seconds, even for devices that consume more
And so in reality it is not instantaneous consumption but a value integrated over time
Probably to make it more stable and less variable than it might actually be


B4X:
2024-01-05 19:14:40 909 - ACCESO DISPLAY
2024-01-05 19:14:41 692 - Current Battery: 419614 uA
2024-01-05 19:14:43 695 - Current Battery: 419614 uA
2024-01-05 19:14:45 697 - Current Battery: 434567 uA
2024-01-05 19:14:47 699 - Current Battery: 434567 uA
2024-01-05 19:14:49 705 - Current Battery: 434567 uA
2024-01-05 19:14:51 709 - Current Battery: 434567 uA
2024-01-05 19:14:53 719 - Current Battery: 434567 uA
2024-01-05 19:14:55 711 - Current Battery: 434567 uA
2024-01-05 19:14:57 713 - Current Battery: 434567 uA
2024-01-05 19:14:59 720 - Current Battery: 434567 uA
2024-01-05 19:15:01 750 - Current Battery: 434567 uA
2024-01-05 19:15:03 753 - Current Battery: 434567 uA
2024-01-05 19:15:04 921 - SPENTO DISPLAY
2024-01-05 19:15:05 751 - Current Battery: 434567 uA
2024-01-05 19:15:07 757 - Current Battery: 434567 uA
2024-01-05 19:15:09 760 - Current Battery: 434567 uA
2024-01-05 19:15:11 762 - Current Battery: 434567 uA
2024-01-05 19:15:13 763 - Current Battery: 434567 uA
2024-01-05 19:15:15 784 - Current Battery: 243528 uA
2024-01-05 19:15:17 769 - Current Battery: 243528 uA
2024-01-05 19:15:19 772 - Current Battery: 243528 uA
2024-01-05 19:15:21 777 - Current Battery: 243528 uA
2024-01-05 19:15:23 779 - Current Battery: 243528 uA
2024-01-05 19:15:25 781 - Current Battery: 243528 uA
2024-01-05 19:15:27 784 - Current Battery: 243528 uA
2024-01-05 19:15:29 788 - Current Battery: 243528 uA
2024-01-05 19:15:31 788 - Current Battery: 243528 uA
2024-01-05 19:15:33 790 - Current Battery: 243528 uA
2024-01-05 19:15:35 792 - Current Battery: 243528 uA
2024-01-05 19:15:37 792 - Current Battery: 243528 uA
2024-01-05 19:15:39 117 - ACCESO DISPLAY
2024-01-05 19:15:39 796 - Current Battery: 243528 uA
2024-01-05 19:15:41 802 - Current Battery: 243528 uA
2024-01-05 19:15:43 802 - Current Battery: 243528 uA
2024-01-05 19:15:45 804 - Current Battery: 368192 uA
2024-01-05 19:15:47 807 - Current Battery: 368192 uA
2024-01-05 19:15:49 807 - Current Battery: 368192 uA
2024-01-05 19:15:51 815 - Current Battery: 368192 uA
2024-01-05 19:15:53 813 - Current Battery: 368192 uA
2024-01-05 19:15:55 815 - Current Battery: 368192 uA
2024-01-05 19:15:58 103 - Current Battery: 368192 uA
2024-01-05 19:16:00 239 - Current Battery: 368192 uA
2024-01-05 19:16:00 604 - ACCESO GPS
2024-01-05 19:16:02 045 - Current Battery: 368192 uA
2024-01-05 19:16:03 821 - Current Battery: 368192 uA
2024-01-05 19:16:05 827 - Current Battery: 368192 uA
2024-01-05 19:16:07 827 - Current Battery: 368192 uA
2024-01-05 19:16:09 835 - Current Battery: 368192 uA
2024-01-05 19:16:11 833 - Current Battery: 368192 uA
2024-01-05 19:16:13 839 - Current Battery: 368192 uA
2024-01-05 19:16:15 841 - Current Battery: 368192 uA
2024-01-05 19:16:17 845 - Current Battery: 392911 uA
2024-01-05 19:16:19 850 - Current Battery: 392911 uA
2024-01-05 19:16:21 853 - Current Battery: 392911 uA
2024-01-05 19:16:23 853 - Current Battery: 392911 uA
2024-01-05 19:16:25 854 - Current Battery: 392911 uA
2024-01-05 19:16:27 858 - Current Battery: 392911 uA
2024-01-05 19:16:29 859 - Current Battery: 392911 uA
2024-01-05 19:16:31 867 - Current Battery: 392911 uA
2024-01-05 19:16:33 868 - Current Battery: 392911 uA
2024-01-05 19:16:35 938 - Current Battery: 392911 uA
2024-01-05 19:16:37 878 - Current Battery: 392911 uA
2024-01-05 19:16:39 878 - Current Battery: 392911 uA
2024-01-05 19:16:41 878 - Current Battery: 392911 uA
2024-01-05 19:16:43 883 - Current Battery: 392911 uA
2024-01-05 19:16:45 885 - Current Battery: 392911 uA
2024-01-05 19:16:46 545 - SPENTO GPS
2024-01-05 19:16:47 886 - Current Battery: 539547 uA
2024-01-05 19:16:49 889 - Current Battery: 539547 uA
2024-01-05 19:16:51 894 - Current Battery: 539547 uA
2024-01-05 19:16:53 897 - Current Battery: 539547 uA
2024-01-05 19:16:55 897 - Current Battery: 539547 uA
2024-01-05 19:16:57 902 - Current Battery: 539547 uA
2024-01-05 19:16:59 912 - Current Battery: 539547 uA
2024-01-05 19:17:01 909 - Current Battery: 539547 uA
2024-01-05 19:17:03 928 - Current Battery: 539547 uA
2024-01-05 19:17:05 918 - Current Battery: 539547 uA
2024-01-05 19:17:07 922 - Current Battery: 539547 uA
2024-01-05 19:17:09 928 - Current Battery: 539547 uA
2024-01-05 19:17:11 924 - Current Battery: 539547 uA
2024-01-05 19:17:13 926 - Current Battery: 539547 uA
2024-01-05 19:17:15 930 - Current Battery: 539547 uA
2024-01-05 19:17:17 935 - Current Battery: 348356 uA
2024-01-05 19:17:19 947 - Current Battery: 348356 uA
2024-01-05 19:17:21 940 - Current Battery: 348356 uA
2024-01-05 19:17:23 944 - Current Battery: 348356 uA
2024-01-05 19:17:25 944 - Current Battery: 348356 uA
2024-01-05 19:17:27 954 - Current Battery: 348356 uA
2024-01-05 19:17:29 950 - Current Battery: 348356 uA
2024-01-05 19:17:31 956 - Current Battery: 348356 uA
2024-01-05 19:17:33 957 - Current Battery: 348356 uA
2024-01-05 19:17:35 961 - Current Battery: 348356 uA
2024-01-05 19:17:37 963 - Current Battery: 348356 uA
2024-01-05 19:17:39 967 - Current Battery: 348356 uA
2024-01-05 19:17:41 975 - Current Battery: 348356 uA
2024-01-05 19:17:43 972 - Current Battery: 348356 uA
2024-01-05 19:17:45 976 - Current Battery: 348356 uA
2024-01-05 19:17:47 979 - Current Battery: 355222 uA
2024-01-05 19:17:49 983 - Current Battery: 355222 uA
2024-01-05 19:17:51 985 - Current Battery: 355222 uA
2024-01-05 19:17:53 988 - Current Battery: 355222 uA
2024-01-05 19:17:56 004 - Current Battery: 355222 uA
2024-01-05 19:17:58 000 - Current Battery: 355222 uA
2024-01-05 19:18:00 001 - Current Battery: 355222 uA
2024-01-05 19:18:01 999 - Current Battery: 355222 uA
2024-01-05 19:18:04 001 - Current Battery: 355222 uA
2024-01-05 19:18:06 022 - Current Battery: 355222 uA
2024-01-05 19:18:06 655 - ACCESA TORCIA
2024-01-05 19:18:08 016 - Current Battery: 355222 uA
2024-01-05 19:18:10 007 - Current Battery: 355222 uA
2024-01-05 19:18:12 011 - Current Battery: 355222 uA
2024-01-05 19:18:14 013 - Current Battery: 355222 uA
2024-01-05 19:18:16 018 - Current Battery: 355222 uA
2024-01-05 19:18:18 023 - Current Battery: 510861 uA
2024-01-05 19:18:20 025 - Current Battery: 510861 uA
2024-01-05 19:18:22 030 - Current Battery: 510861 uA
2024-01-05 19:18:24 029 - Current Battery: 510861 uA
2024-01-05 19:18:26 031 - Current Battery: 510861 uA
2024-01-05 19:18:28 034 - Current Battery: 510861 uA
2024-01-05 19:18:30 034 - Current Battery: 510861 uA
2024-01-05 19:18:32 036 - Current Battery: 510861 uA
2024-01-05 19:18:34 040 - Current Battery: 510861 uA
2024-01-05 19:18:36 050 - Current Battery: 510861 uA
2024-01-05 19:18:38 048 - Current Battery: 510861 uA
2024-01-05 19:18:40 052 - Current Battery: 510861 uA
2024-01-05 19:18:42 057 - Current Battery: 510861 uA
2024-01-05 19:18:44 057 - Current Battery: 510861 uA
2024-01-05 19:18:46 059 - Current Battery: 510861 uA
2024-01-05 19:18:48 065 - Current Battery: 478360 uA
2024-01-05 19:18:50 072 - Current Battery: 478360 uA
2024-01-05 19:18:52 122 - Current Battery: 478360 uA
2024-01-05 19:18:54 070 - Current Battery: 478360 uA
2024-01-05 19:18:56 077 - Current Battery: 478360 uA
2024-01-05 19:18:58 078 - Current Battery: 478360 uA
2024-01-05 19:19:00 078 - Current Battery: 478360 uA
2024-01-05 19:19:01 424 - SPENTA TORCIA
2024-01-05 19:19:02 082 - Current Battery: 478360 uA
2024-01-05 19:19:04 084 - Current Battery: 478360 uA
2024-01-05 19:19:06 088 - Current Battery: 478360 uA
2024-01-05 19:19:08 093 - Current Battery: 478360 uA
2024-01-05 19:19:10 095 - Current Battery: 478360 uA
2024-01-05 19:19:12 115 - Current Battery: 478360 uA
2024-01-05 19:19:14 100 - Current Battery: 478360 uA
2024-01-05 19:19:16 104 - Current Battery: 478360 uA
2024-01-05 19:19:18 107 - Current Battery: 346677 uA
2024-01-05 19:19:20 108 - Current Battery: 346677 uA
2024-01-05 19:19:22 111 - Current Battery: 346677 uA
2024-01-05 19:19:24 114 - Current Battery: 346677 uA
2024-01-05 19:19:26 121 - Current Battery: 346677 uA
2024-01-05 19:19:28 121 - Current Battery: 346677 uA
2024-01-05 19:19:30 123 - Current Battery: 346677 uA
2024-01-05 19:19:30 568 - ACCESA FOTOCAMERA
2024-01-05 19:19:32 161 - Current Battery: 346677 uA
2024-01-05 19:19:34 204 - Current Battery: 346677 uA
2024-01-05 19:19:36 243 - Current Battery: 346677 uA
2024-01-05 19:19:38 317 - Current Battery: 346677 uA
2024-01-05 19:19:40 319 - Current Battery: 346677 uA
2024-01-05 19:19:42 359 - Current Battery: 346677 uA
2024-01-05 19:19:44 425 - Current Battery: 346677 uA
2024-01-05 19:19:46 434 - Current Battery: 942529 uA
2024-01-05 19:19:48 478 - Current Battery: 942529 uA
2024-01-05 19:19:50 523 - Current Battery: 942529 uA
2024-01-05 19:19:52 588 - Current Battery: 942529 uA
2024-01-05 19:19:54 611 - Current Battery: 942529 uA
2024-01-05 19:19:56 626 - Current Battery: 942529 uA
2024-01-05 19:19:58 669 - Current Battery: 942529 uA
2024-01-05 19:20:00 695 - Current Battery: 942529 uA
2024-01-05 19:20:02 731 - Current Battery: 942529 uA
2024-01-05 19:20:04 769 - Current Battery: 942529 uA
2024-01-05 19:20:06 830 - Current Battery: 942529 uA
2024-01-05 19:20:08 837 - Current Battery: 942529 uA
2024-01-05 19:20:10 850 - Current Battery: 942529 uA
2024-01-05 19:20:12 892 - Current Battery: 942529 uA
2024-01-05 19:20:14 937 - Current Battery: 942529 uA
2024-01-05 19:20:16 992 - Current Battery: 890039 uA
2024-01-05 19:20:19 020 - Current Battery: 890039 uA
2024-01-05 19:20:21 017 - Current Battery: 890039 uA
2024-01-05 19:20:21 900 - SPENTA FOTOCAMERA
2024-01-05 19:20:23 019 - Current Battery: 890039 uA
2024-01-05 19:20:25 021 - Current Battery: 890039 uA
2024-01-05 19:20:27 024 - Current Battery: 890039 uA
2024-01-05 19:20:29 031 - Current Battery: 890039 uA
2024-01-05 19:20:31 032 - Current Battery: 890039 uA
2024-01-05 19:20:33 034 - Current Battery: 890039 uA
2024-01-05 19:20:35 038 - Current Battery: 890039 uA
2024-01-05 19:20:37 062 - Current Battery: 890039 uA
2024-01-05 19:20:39 044 - Current Battery: 890039 uA
2024-01-05 19:20:41 049 - Current Battery: 890039 uA
2024-01-05 19:20:43 050 - Current Battery: 890039 uA
2024-01-05 19:20:45 055 - Current Battery: 890039 uA
2024-01-05 19:20:47 056 - Current Battery: 384519 uA
2024-01-05 19:20:49 068 - Current Battery: 384519 uA
2024-01-05 19:20:51 073 - Current Battery: 384519 uA
2024-01-05 19:20:53 063 - Current Battery: 384519 uA
2024-01-05 19:20:55 068 - Current Battery: 384519 uA
2024-01-05 19:20:57 069 - Current Battery: 384519 uA
2024-01-05 19:20:59 105 - Current Battery: 384519 uA
2024-01-05 19:21:01 149 - Current Battery: 384519 uA
2024-01-05 19:21:03 195 - Current Battery: 384519 uA
2024-01-05 19:21:05 234 - Current Battery: 384519 uA
2024-01-05 19:21:07 275 - Current Battery: 384519 uA
2024-01-05 19:21:09 313 - Current Battery: 384519 uA
2024-01-05 19:21:11 351 - Current Battery: 384519 uA
2024-01-05 19:21:13 284 - ACCESA TERMOCAMERA
2024-01-05 19:21:13 349 - Current Battery: 384519 uA
2024-01-05 19:21:15 353 - Current Battery: 384519 uA
2024-01-05 19:21:17 357 - Current Battery: 683894 uA
2024-01-05 19:21:19 363 - Current Battery: 683894 uA
2024-01-05 19:21:21 405 - Current Battery: 683894 uA
2024-01-05 19:21:23 412 - Current Battery: 683894 uA
2024-01-05 19:21:25 449 - Current Battery: 683894 uA
2024-01-05 19:21:27 486 - Current Battery: 683894 uA
2024-01-05 19:21:29 836 - Current Battery: 683894 uA
2024-01-05 19:21:31 556 - Current Battery: 683894 uA
2024-01-05 19:21:33 591 - Current Battery: 683894 uA
2024-01-05 19:21:35 632 - Current Battery: 683894 uA
2024-01-05 19:21:37 669 - Current Battery: 683894 uA
2024-01-05 19:21:39 705 - Current Battery: 683894 uA
2024-01-05 19:21:41 722 - Current Battery: 683894 uA
2024-01-05 19:21:43 721 - Current Battery: 683894 uA
2024-01-05 19:21:45 762 - Current Battery: 683894 uA
2024-01-05 19:21:47 802 - Current Battery: 1004937 uA
2024-01-05 19:21:49 816 - Current Battery: 1004937 uA
2024-01-05 19:21:51 852 - Current Battery: 1004937 uA
2024-01-05 19:21:53 884 - Current Battery: 1004937 uA
2024-01-05 19:21:55 906 - Current Battery: 1004937 uA
2024-01-05 19:21:57 940 - Current Battery: 1004937 uA
2024-01-05 19:21:59 980 - Current Battery: 1004937 uA
2024-01-05 19:22:02 023 - Current Battery: 1004937 uA
2024-01-05 19:22:04 058 - Current Battery: 1004937 uA
2024-01-05 19:22:06 098 - Current Battery: 1004937 uA
2024-01-05 19:22:08 150 - Current Battery: 1004937 uA
2024-01-05 19:22:10 178 - Current Battery: 1004937 uA
2024-01-05 19:22:12 206 - Current Battery: 1004937 uA
2024-01-05 19:22:14 264 - Current Battery: 1004937 uA
2024-01-05 19:22:16 281 - Current Battery: 1004937 uA
2024-01-05 19:22:18 318 - Current Battery: 1364585 uA
2024-01-05 19:22:20 359 - Current Battery: 1364585 uA
2024-01-05 19:22:22 404 - Current Battery: 1364585 uA
2024-01-05 19:22:24 436 - Current Battery: 1364585 uA
2024-01-05 19:22:26 478 - Current Battery: 1364585 uA
2024-01-05 19:22:28 512 - Current Battery: 1364585 uA
2024-01-05 19:22:30 525 - Current Battery: 1364585 uA
2024-01-05 19:22:32 559 - Current Battery: 1364585 uA
2024-01-05 19:22:34 602 - Current Battery: 1364585 uA
2024-01-05 19:22:36 617 - Current Battery: 1364585 uA
2024-01-05 19:22:38 665 - Current Battery: 1364585 uA
2024-01-05 19:22:40 696 - Current Battery: 1364585 uA
2024-01-05 19:22:42 734 - Current Battery: 1364585 uA
2024-01-05 19:22:44 779 - Current Battery: 1364585 uA
2024-01-05 19:22:46 784 - Current Battery: 1364585 uA
2024-01-05 19:22:48 823 - Current Battery: 1163323 uA
2024-01-05 19:22:50 822 - Current Battery: 1163323 uA
2024-01-05 19:22:52 864 - Current Battery: 1163323 uA
2024-01-05 19:22:54 899 - Current Battery: 1163323 uA
2024-01-05 19:22:56 898 - Current Battery: 1163323 uA
2024-01-05 19:22:57 675 - SPENTA TERMOCAMERA
2024-01-05 19:22:58 903 - Current Battery: 1163323 uA
2024-01-05 19:23:00 904 - Current Battery: 1163323 uA
2024-01-05 19:23:02 906 - Current Battery: 1163323 uA
2024-01-05 19:23:04 912 - Current Battery: 1163323 uA
2024-01-05 19:23:06 918 - Current Battery: 1163323 uA
2024-01-05 19:23:08 920 - Current Battery: 1163323 uA
2024-01-05 19:23:10 923 - Current Battery: 1163323 uA
2024-01-05 19:23:12 925 - Current Battery: 1163323 uA
2024-01-05 19:23:14 928 - Current Battery: 1163323 uA
2024-01-05 19:23:16 934 - Current Battery: 1163323 uA
2024-01-05 19:23:18 936 - Current Battery: 359494 uA
2024-01-05 19:23:20 942 - Current Battery: 359494 uA
2024-01-05 19:23:22 938 - Current Battery: 359494 uA
2024-01-05 19:23:24 945 - Current Battery: 359494 uA
2024-01-05 19:23:26 945 - Current Battery: 359494 uA
2024-01-05 19:23:28 953 - Current Battery: 359494 uA
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
Yeah, it looks like it is taking an average reading, so sudden spike wont effect the reading unless they are sustained.

If the code I provided did work, please mark that post as a "Solution" for you question.
 
Upvote 0
Top