Skip to content

Commit 2281a27

Browse files
authored
Update README.md
Readme Formatting
1 parent e0f20ae commit 2281a27

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

README.md

+14-10
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,22 @@ A small helper library using minimalmodbus for the popular dps5005 power supply
44
Dependencies:
55
minimalmodbus and serial
66

7+
78
Example Usage:
89

9-
import pydps
10+
import pydps
11+
12+
dps = pydps.dps_psu('COM3', 1) # port name, slave address
13+
14+
print(dps.getModel()) #Should show 5005 for dps5005
15+
print(dps.getVoltage()) #returns the measured output voltage
16+
print(dps.getCurrent()) #Prints measured output current in A
17+
18+
# or get the full dataset at once:
1019

11-
dps = pydps.dps_psu('COM3', 1) # port name, slave address
20+
dat = dps.getFullData()
1221

13-
print(dps.getModel()) #Should show 5005 for dps5005
14-
print(dps.getVoltage()) #returns the measured output voltage
15-
print(dps.getCurrent()) #Prints measured output current in A
22+
# Contained values: u-set, i-set, u-out, i-out, power, u-in, lock, protect, cvcc, on
1623

17-
#or get the full dataset at once:
18-
dat = dps.getFullData()
19-
#Contained values: u-set, i-set, u-out, i-out, power, u-in, lock, protect, cvcc, on
20-
print(dat["power"]) #Prints measured power in W
21-
print(dat["i-out"]) #Prints measured output current in A
24+
print(dat["power"]) #Prints measured power in W
25+
print(dat["i-out"]) #Prints measured output current in A

0 commit comments

Comments
 (0)