Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By darethehair
#57092 OK, I am still a newbie in the NodeMCU world, but this one baffles me...

I have a fully functioning setup with BMP180 and DHT22 sensor chips, and LUA code to display the various readings on demand through webserver code. Recently, I added an SSD1306 OLED 128x64 display to show the values that I am *successfully* reading. However, I get the classic 'random dots something has gone wrong' display on the OLED display if I activate/initialize the BMP180 at all! As soon as I comment out the code to do so, my OLED display works fine (only displaying the DHT22 readings)!

Code: Select allfunction ReadBMP()
        bmp085.init(bmp180_sda, bmp180_scl)
        local temp2 = bmp085.temperature()
        local pres = bmp085.pressure(oss)
        fare=(temp2*9/5+32)
        print("Pressure:    "..string.format("%.1f",pres).." hPa")
        print("Temperature: "..string.format("%.1f",temp2).." deg C")
        print("Temperature: "..string.format("%.1f",fare).." deg F")
        print(" ")
end

bmp180_sda = 1
bmp180_scl = 2
bmp180_oss = 3
-- ReadBMP()


If I connect to the NodeMCU with 'screen' (in Linux), there are absolutely no errors at all -- so nothing to be 'fixed'. In desperation, I have even swapped GPIO pin assignments around -- suspecting that maybe there is some hidden issue. No difference.