Hi,
I've flashed the `ESP8266` version of `MicroPython` to my `ESP8266` development board (Amica) and I'm trying to use the official `ssd1306` driver found in `micropython/drivers/display/` directory on the GitHub page (here:
https://github.com/micropython/micropyt ... ssd1306.py) to drive my OLED display using I2C.
My problem is that I can't load the library on my ESP8266. I've tried at the python prompt on my board:
from SSD1306 import ssd1306
from drivers import ssd1306
import ssd1306
import SSD1306
but the error every time is "... module <x> not found".
How can I use the ssd1306 official driver on my ESP8266 board? Thanks!
Using the ssd1306.py driver on the ESP8266
-
- Posts: 2
- Joined: Sat Aug 13, 2016 6:18 pm
Re: Using the ssd1306.py driver on the ESP8266
What version are you using? I'm using 1.8.3 and import ssd1306 works for me on a Wemos D1 mini.
Can you import e.g. onewire?
Can you import e.g. onewire?
Re: Using the ssd1306.py driver on the ESP8266
If you are compiling your own firmware, you need to symlink the file to esp8266/scripts for it to be included. Alternatively, you can copy the file onto the board with WebREPL after flashing -- either will work.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Using the ssd1306.py driver on the ESP8266
If you're using a release build of firmware I think you need to use esp8266-20160809-v1.8.3.bin rather than the latest nightly build. It seems that the nightly builds don't include the libraries. Alternatively copy the file as suggested by @deshipu.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.