displaywifi.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:esp8266_micropython_wifi_scan 作者: casperp 项目源码 文件源码
def show_display(self):
        """The function that will show the display. First clean the display then
         show all data. For network names if the name is longer than the display
          it split in two and shown on row 1,2. When all the data is written the
          esp will sleep for 10000 ms"""

        self.oled.fill(0)
        self.oled.show()
        if len(self.name) > 15:
            self.oled.text(self.name[0:15],0,0)
            self.oled.text(self.name[15:int(len(self.name))],0,10)
        else:
            self.oled.text(self.name,0,0)
        self.oled.text(self.strengt,30,20)
        self.oled.text(self.status,30,30)
        self.oled.text(self.kanaal, 30,40)
        self.oled.text((str(gc.mem_free())+ " B"), 30,50)
        self.oled.show()
        utime.sleep_ms(10000)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号