Skip to content
This repository was archived by the owner on Sep 10, 2024. It is now read-only.

Commit eaa7a5b

Browse files
author
Alex Bucknall
committed
Updated example Pysense main.py to match updated libraries
1 parent 14b8eee commit eaa7a5b

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

pysense/main.py

+18-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
1+
# See https://docs.pycom.io for more information regarding library specifics
2+
13
from pysense import Pysense
24
from LIS2HH12 import LIS2HH12
35
from SI7006A20 import SI7006A20
46
from LTR329ALS01 import LTR329ALS01
57
from MPL3115A2 import MPL3115A2
68

79
py = Pysense()
8-
pressure = MPL3115A2(py)
9-
tempHum = SI7006A20(py)
10-
ambientLight = LTR329ALS01(py)
11-
acc = LIS2HH12(py)
10+
mp = MPL3115A2(py,mode=ALTITUDE) # Returns height in meters. Mode may also be set to PRESSURE, returning a value in Pascals
11+
si = SI7006A20(py)
12+
lt = LTR329ALS01(py)
13+
li = LIS2HH12(py)
14+
15+
print(mp.temperature())
16+
print(mp.altitude())
17+
print(si.temperature())
18+
print(si.humidity())
19+
print(lt.light())
20+
print(li.acceleration())
21+
print(li.roll())
22+
print(li.pitch())
23+
print(li.yaw())
24+
25+
print(py.read_battery_voltage())

0 commit comments

Comments
 (0)