I have created a small library to control an SSD1306 OLED display from a micro:bit. Currently it only supports I2C and has very limited functionality, but I believe it can be a nice low cost enhanced alternative to the default 5x5 LED display.
I have published in github at https://github.com/fizban99/microbit_ssd1306
SSD1306 library for the micro:bit
Re: SSD1306 library for the micro:bit
Nice!
Did you know that you can now use any two pins for I2C? That means you could use that display without the edge connector.
Did you know that you can now use any two pins for I2C? That means you could use that display without the edge connector.
Re: SSD1306 library for the micro:bit
According to the documentation, that should be possible, yes, but then you lose the accelerometer and compass functionality.
Besides, in the REPL, if i do:
I only get
Is the init function only available in a later version?
Besides, in the REPL, if i do:
Code: Select all
>>> from microbit import i2c
>>> dir(i2c)
Code: Select all
['read', 'write']
Re: SSD1306 library for the micro:bit
Yes, it was added recently.
Re: SSD1306 library for the micro:bit
Well, I am on Windows and both the official version 0.9.13 and version mu-2017-01-29_15_38_04.exe from ardublocky builds show the following
Perhaps you mean a future version of mu not yet released?
Code: Select all
MicroPython v1.7-9-gbe020eb on 2016-04-18; micro:bit with nRF51822
Type "help()" for more information.
>>> from microbit import i2c
>>> dir(i2c)
['read', 'write']
>>>
Re: SSD1306 library for the micro:bit
It merged in November last year, I'm not sure if this was released already, but I have an impression that there was a release before Christmas. Unfortunately there are no tags in the repository that would signify at which point a release was made, so it's a little hard to say.
Re: SSD1306 library for the micro:bit
That was 0.9.13 of mu, yes, but I was not able to find references of the init method in the mu repository. It does noe appear either In the november version of the API definition for code completion. It might be part of the new version of the micropython firmware that solves some pwm issues among others...