nodemcu的hello world

Posted 79 months ago nodemcu esp8266 esp

已经刷好了nodemcu

function Init_oled(sda,scl,sla)

   i2c.setup(0, sda, scl, i2c.SLOW)
   disp = u8g.ssd1306_128x32_i2c(sla)

end

function  First_Screen()

   disp:firstPage()
 repeat
   disp:drawBox(10,10,10,10)
 until disp:nextPage() == false

end

Init_oled(2,1,0x3c)
First_Screen()

点击评论