how to use framebuf on ESP32
Posted: Thu Jun 11, 2020 6:50 pm
Hello every one!
stupid question
how to use framebuf on ESP32?
i have a manual
and i have a simple code:
how to make it work togethe?
if i try this
ESP told me
stupid question
how to use framebuf on ESP32?
i have a manual
and i have a simple code:
Code: Select all
from machine import Pin, I2C
import ssd1306
def display(zuzu, scl_pin=22, sda_pin=21, oled_width = 128, oled_height = 64):
#the list for "display" must contain data in format like (string, int, int)
i2c = I2C(-1, scl=Pin(scl_pin), sda=Pin(sda_pin))
oled = ssd1306.SSD1306_I2C(oled_width, oled_height, i2c)
oled.fill(0)
for i in zuzu:
oled.text(*i)
oled.show()
if __name__ == '__main__':
x = 6
list = [
('bad', 0, 0),
('good', 10, 10),
('ugly', 20, 20),
('bullets:', 5, 30), (str(x), 70, 30),
('Google', 20, 40)
]
display(list)
if i try this
ESP told me
Code: Select all
Traceback (most recent call last):
File "<stdin>", line 51, in <module>
AttributeError: 'SSD1306_I2C' object has no attribute 'framebuf'