File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -19,15 +19,18 @@ To enable power monitoring in Ampere mode implement the following sequence:
1919```
2020ppk2_test = PPK2_API("/dev/ttyACM3") # serial port will be different for you
2121ppk2_test.get_modifiers()
22- ppk2_test.use_ampere_meter() # set ampere meter mode
22+ ppk2_test.user_source_meter() # set source meter mode
23+ ppk2_test.set_source_voltage(3300) # set source voltage in mV
2324ppk2_test.start_measuring() # start measuring
2425
2526# read measured values in a for loop like this:
2627for i in range(0, 1000):
2728 read_data = ppk2_test.get_data()
2829 if read_data != b'':
29- ppk2_test.average_of_sampling_period(read_data)
30- time.sleep(0.01)
30+ samples = ppk2_test.get_samples(read_data)
31+ print(f"Average of {len(samples)} samples is: {sum(samples)/len(samples)}uA")
32+ time.sleep(0.001) # lower time between sampling -> less samples read in one sampling period
33+ ppk2_test.stop_measuring()
3134```
3235
3336
You can’t perform that action at this time.
0 commit comments