I2C was right, don't use pyb. The real reason for the error is confusing softI2C with hardware I2C. When you specify an I2C number (which i2c controller to use), then you are implicitly specifying it should be hardware i2c. In that case, the start/stop function's don't exist because they don't make sense, because they are only necessary for soft i2c when bitbanging the lines. So you need to avoid that call, or remove the i2c number, which implicitly makes micropython use a software i2c. but currently that throws a deprecation warning.
if you look at ` File "ssd1306.py", line 109, in write_data` you'll realize the function body attemps to call i2c.start()`, since the ssd1306 library in question expects it to be a software I2C. This means you either have to use software I2C, or modify the library, or use another one.
if you look at ` File "ssd1306.py", line 109, in write_data` you'll realize the function body attemps to call i2c.start()`, since the ssd1306 library in question expects it to be a software I2C. This means you either have to use software I2C, or modify the library, or use another one.
Statistics: Posted by moefear85 — Mon Mar 25, 2024 3:52 pm