File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -20,14 +20,16 @@ function LPS25H_pressure()
20
20
smbus_read (CTRL_REG2) == 0 && break # check if finished
21
21
end
22
22
23
- pressure = (Int32 (smbus_read (0x2a )) << 16 | Int16 (smbus_read (0x29 )) << 8 | smbus_read (0x28 )) / 4096
23
+ pressure = (UInt64 .(smbus_read (0x2a )) << 16 |
24
+ UInt64 .(smbus_read (0x29 )) << 8 |
25
+ UInt64 .(smbus_read (0x28 )))/ 4096.0
24
26
25
27
smbus_write (CTRL_REG1, 0x00 ) # power down
26
28
return pressure
27
29
end
28
30
29
31
"""
30
- HTS221_temperature ()
32
+ LPS25H_temperature ()
31
33
32
34
The temperature (in °C) from the LPS25H sensor.
33
35
"""
Original file line number Diff line number Diff line change 1
1
using SenseHat
2
- using Base . Test
2
+ using Test
3
3
4
4
using ColorTypes
5
5
Original file line number Diff line number Diff line change 1
- using Base . Test
1
+ using Test
2
2
using SenseHat
3
3
4
4
@test - 40 <= temperature () <= 60
You can’t perform that action at this time.
0 commit comments