
'/BMP180.bas/2021.01.12
'BMP180/SDA-->D2/GPIO4/SDA
'BMP180/SCL-->D1/GPIO5/SCL
'BMP180/GND-->GND
'BMP180/VIN-->3.3V
wifi.connect
i2c.setup(4,5) 'SDA=GPIO4, SCL=GPIO5 (WEMOS D1 mini)
memclear
cls
print "D1 mini<--BMP180"
wprint "CurrTemp(C)"
textbox curr
wprint "<br>" 'LF
wprint "Pressure(hPa)"
textbox press
wprint "<br>" 'LF
button "Exit", [quit]
timer 1000, [refresh] '1sec
wait
[refresh]
i2c.begin(119) 'i2c_address=0x77-->119
i2c.requestfrom(119,1)
curr = i2c.read()
'Serial.print(bmp.readTemperature());
i2c.end()
press = 500
wait
[quit]
timer 0
end