Skip to content

Commit

Permalink
Update SPIReadPressure
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Liu <andy@madmachine.io>
  • Loading branch information
andy0808 committed Sep 21, 2024
1 parent 52a48ac commit 9941463
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ public struct SPIReadPressure {
// let sensor = MS5611(spi)

while true {
let value = sensor.read()
print(getFloatString(value))
let (temperature, pressure) = sensor.read()

print("Temperature: " + getFloatString(temperature))
print("Pressure: " + getFloatString(pressure))
print(" ")
sleep(ms: 1000)
}
}
Expand Down

0 comments on commit 9941463

Please sign in to comment.