Skip to content

Commit 6393136

Browse files
committed
Update description and comments
1 parent 1216842 commit 6393136

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed
Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#
22
# Copyright (C) 2019 Pico Technology Ltd. See LICENSE file for terms.
33
#
4-
# PICOHRDL SINGLE MODE EXAMPLE
4+
# PICOLOG HIGH RESOLUTION DATA LOGGER SINGLE MODE EXAMPLE
5+
#
6+
# This example demonstrates how to capture a single value from an ADC-20 or ADC-24 High Resolution Data Logger.
57

68

79
import ctypes
@@ -13,30 +15,30 @@
1315
chandle = ctypes.c_int16()
1416
status = {}
1517

16-
# open unit
18+
# Open unit
1719
status["openUnit"] = hrdl.HRDLOpenUnit()
1820
assert_pico2000_ok(status["openUnit"])
1921
chandle=status["openUnit"]
2022

21-
# set mains noise rejection
22-
# reject 50 Hz mains noise
23+
# Set mains noise rejection
24+
# Reject 50 Hz mains noise
2325
status["mainsRejection"] = hrdl.HRDLSetMains(chandle, 0)
2426
assert_pico2000_ok(status["mainsRejection"])
2527

26-
# set single reading
28+
# Set single reading
2729
range = hrdl.HRDL_VOLTAGERANGE["HRDL_2500_MV"]
2830
conversionTime = hrdl.HRDL_CONVERSIONTIME["HRDL_100MS"]
2931
overflow = ctypes.c_int16(0)
3032
value = ctypes.c_int32()
3133
status["getSingleValue"] = hrdl.HRDLGetSingleValue(chandle, 5, range, conversionTime, 1, ctypes.byref(overflow), ctypes.byref(value))
3234
assert_pico2000_ok(status["getSingleValue"])
3335

34-
# display value
36+
# Display value
3537
print(value.value)
3638

37-
# close unit
39+
# Close unit
3840
status["closeUnit"] = hrdl.HRDLCloseUnit(chandle)
3941
assert_pico2000_ok(status["closeUnit"])
4042

41-
# print status
43+
# Print status
4244
print(status)

0 commit comments

Comments
 (0)