You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
localSDA_PIN=4-- BMP180 SDA pin on GPIO2localSCL_PIN=3-- BMP180 SCL pin on GPIO0localOSS=3-- BMP180 oversampling setting (0: ultra low power, 1: standard, 2: high resolution, 3: ultra high resolution)-- Test with bmp180 lua module (https://github.com/javieryanez/nodemcu-modules/tree/master/bmp180)localbmp180=require("bmp180")
bmp180.init(SDA_PIN, SCL_PIN)
bmp180.read(OSS)
localt1=string.format("%.1f", bmp180.getTemperature() /10)
localp1=string.format("%.1f", bmp180.getPressure() /100)
bmp180=nilpackage.loaded["bmp180"] =nilprint("Lua module temperature:", t1)
print("Lua module pressure:", p1)
-- Test with bmp085 native modulebmp085.init(SDA_PIN, SCL_PIN)
localt2=string.format("%.1f", bmp085.temperature() /10)
localp2=string.format("%.1f", bmp085.pressure(OSS) /100)
print("Native module temperature:", t2)
print("Native module pressure:", p2)
NodeMCU version
NodeMCU custom build by frightanic.com
branch: master
commit: 95e85c7
SSL: false
modules: adc,bmp085,cjson,dht,file,gpio,i2c,net,node,tmr,uart,wifi
build built on: 2016-08-23 18:24
powered by Lua 5.1.4 on SDK 1.5.4.1(39cb9a32)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Expected behavior
Right values returned by bmp180 lua module:
Actual behavior
Wrong values returned by bmp085 native module:
Test code
NodeMCU version
Hardware
ESP8266 board based on ESP-12f
The text was updated successfully, but these errors were encountered: