Skip to content

Commit aa571a1

Browse files
neil.hamiltonhsmistry
authored andcommitted
Merge branch 'master'
2 parents ddfb417 + a51688c commit aa571a1

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@
1212

1313
# distutils build directory
1414
build/
15+
16+
# venv directory
17+
venv/
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 Precision 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)

tc08Examples/tc08StreamingModeExample.py renamed to usbtc08Examples/tc08StreamingModeExample.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# Copyright (C) 2019 Pico Technology Ltd. See LICENSE file for terms.
33
#
4-
# TC-08 SINGLE MODE EXAMPLE
4+
# TC-08 STREAMING MODE EXAMPLE
55

66

77
import ctypes

0 commit comments

Comments
 (0)