0

Feather M0 Express and OLED ssd1306.mpy not working
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Feather M0 Express and OLED ssd1306.mpy not working

by KingerNorth on Fri Jan 04, 2019 12:35 pm

Last week I received the Feather M0 Express and I wanted to use it with the Feather OLED 128x32. I am using CircuitPython 3.1.1 so Installed the UF2 on the M0 Express and all seems okay with that. When I added the OLED an used some simple code to test the OLED it would not work. I got the following error when using the 20181231 lib bundle:
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Traceback (most recent call last):
File "code.py", line 11, in <module>
TypeError: function missing 1 required positional arguments

The first few lines of code as as follows:
import time
import board
import busio as io
import adafruit_ssd1306
from digitalio import DigitalInOut, Direction

led = DigitalInOut(board.D13)
led.direction = Direction.OUTPUT
i2c = io.I2C(board.SCL, board.SDA)

oled = adafruit_ssd1306.SSD1306_I2C(128, 32, i2c)

I did some testing and the OLED works fine with the Feather M0 Express when I tested it using the Arduino Example code just fine. I continued testing by re-installing the UF2 file and still it would not work. In an attempt to fix the issue I copied the adafruit_ssd1306.mpy file from a library bundle from the summer. The date on the file is August 21, 2018 with a file size of 4,612 bytes. The OLED now works perfectly using the older lib file. The new lib file is only 4,424 bytes dated December 31, 2018.

I suspect that something in the file was changed but it doesn't work using the current lib file.
Thanks
David King

KingerNorth
 
Posts: 5
Joined: Sat May 19, 2018 11:01 pm

Re: Feather M0 Express and OLED ssd1306.mpy not working

by adafruit_support_carter on Fri Jan 04, 2019 1:32 pm

In general, it should work with the latest firmware and library versions. If you are using example code that is out of date, it may not be using the library correctly. Does the simpletest example run OK?
https://github.com/adafruit/Adafruit_Ci ... pletest.py

adafruit_support_carter
 
Posts: 9729
Joined: Tue Nov 29, 2016 2:45 pm

Re: Feather M0 Express and OLED ssd1306.mpy not working

by KingerNorth on Fri Jan 04, 2019 7:06 pm

No the simplest sample does not work. The code I'm using is very straight forward. My biggest concern is that the error states that another parameter is required and I have tried many combinations of resets, addresses and so on with no success. I am using all of the latest builds and can only get it to work using an old, outdated, library file.

Line 11 of the code is "oled = adafruit_ssd1306.SSD1306_I2C(128, 32, i2c)".

KingerNorth
 
Posts: 5
Joined: Sat May 19, 2018 11:01 pm

Re: Feather M0 Express and OLED ssd1306.mpy not working

by adafruit_support_carter on Mon Jan 07, 2019 3:46 pm

I just checked the example using a Feather M0 Express and it worked for me. What happens when you try running the example? It just does nothing? You get an error message? Something else?

adafruit_support_carter
 
Posts: 9729
Joined: Tue Nov 29, 2016 2:45 pm

Re: Feather M0 Express and OLED ssd1306.mpy not working

by KingerNorth on Mon Jan 07, 2019 6:55 pm

I just received a Feather M4 Express and I will try the example code using this M4 and the M0. I will copy the error message, if it happens again, with either or both micro-controllers. I will use the latest build, Jan 06, 2019. I will post all of the results here.

KingerNorth
 
Posts: 5
Joined: Sat May 19, 2018 11:01 pm

Re: Feather M0 Express and OLED ssd1306.mpy not working

by KingerNorth on Tue Jan 08, 2019 11:55 am

Okay I'm working with the Feather MO Express and I have loaded "adafruit-circuitpython-feather_m0_express-3.1.2.uf2" bootloader. I have also installed the library files from the "build_adafruit_circuitpython_bundle_py_20190105" bundle. From that same bundle I copied over the example file "ssd1306_framebuftest.py" into MU and saved it on the Feather MO Express as code.py. An error occurred right away with the message:

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Traceback (most recent call last):
File "code.py", line 26, in <module>
TypeError: function does not take keyword arguments

Line 26 of the code is "display = adafruit_ssd1306.SSD1306_I2C(128, 32, i2c, addr=0x3c, reset=reset_pin)"

Next Step: I removed the keyword arguments " addr=0x3c, reset=reset_pin" from the code so that the new code on line 26 is "display = adafruit_ssd1306.SSD1306_I2C(128, 32, i2c)" and saved the file to the Feather M0 Express.

The error message changed to:

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Traceback (most recent call last):
File "code.py", line 26, in <module>
TypeError: function missing 1 required positional arguments

Now it says that 1 required positional argument is missing.

Now I'm trying the same file and library using a brand new Feather M4 Express that I received yesterday. The boot_out.txt file preinstalled had the following text "Adafruit CircuitPython 3.1.1 on 2018-11-02; Adafruit Feather M4 Express with samd51j19".

I saved the code.py file of the example from MU onto the Feather M4 Express. I received the exact same error message of:

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Traceback (most recent call last):
File "code.py", line 26, in <module>
TypeError: function missing 1 required positional arguments

I am at a loss of how to get the Feather OLED working with the Feather M0 or M4 Express using the current files. The only success I've had is using the adafruit_ssd1306.mpy from the August 2017 bundle.

Thanks

KingerNorth
 
Posts: 5
Joined: Sat May 19, 2018 11:01 pm

Re: Feather M0 Express and OLED ssd1306.mpy not working

by adafruit_support_carter on Tue Jan 08, 2019 12:16 pm

library files from the "build_adafruit_circuitpython_bundle_py_20190105" bundle

Can you clarify where this came from? The name doesn't match the bundle release file names.
https://github.com/adafruit/Adafruit_Ci ... g/20190105

adafruit_support_carter
 
Posts: 9729
Joined: Tue Nov 29, 2016 2:45 pm

Re: Feather M0 Express and OLED ssd1306.mpy not working

by KingerNorth on Wed Jan 09, 2019 3:02 pm

Sorry I copied the wrong bundle name, it came from the bundled zip file; https://github.com/adafruit/Adafruit_Ci ... 190106.zip

Thanks, David

KingerNorth
 
Posts: 5
Joined: Sat May 19, 2018 11:01 pm

Re: Feather M0 Express and OLED ssd1306.mpy not working

by bsimison on Fri Jan 11, 2019 10:00 am

Hi Everyone,

I'm experiencing the same issue here. The error message from mu-editor serial output when using:

display = adafruit_ssd1306.SSD1306_I2C(128, 64, i2c, addr=0x3c)

is "function does not take keyword arguments" . Removing the addr= argument and using this line:

display = adafruit_ssd1306.SSD1306_I2C(128, 64, i2c)

produces the error "function missing 1 required positional arguments".

Thanks in advance!
-Brett
bsimison
 
Posts: 1
Joined: Tue Feb 25, 2014 9:58 am

Re: Feather M0 Express and OLED ssd1306.mpy not working

by adafruit_support_carter on Fri Jan 11, 2019 12:09 pm

Sorry about this. There is something currently broken in the library. It is due to some recent updates. I was finally able to recreate the issue by updating to the same version of the library bundle you were using.

We are still tracking it down. But here is the issue thread that you can monitor for progress.
https://github.com/adafruit/Adafruit_Ci ... /issues/23

adafruit_support_carter
 
Posts: 9729
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.