SSD1306_SPI TypeError: function expected at most 5 arguments, got 6
-
Hi,
I'm having a WiPy 3.0 with Expansion Board 3.0 and an SSD1306_SPI module from adafruit. (https://www.adafruit.com/product/661)
I've downloaded a driver from https://github.com/micropython/micropython/blob/master/drivers/display/ssd1306.py.I've imported the file into the library folder on my device.
When I run the script in Atom I've got the following error:Traceback (most recent call last):
File "<stdin>", line 7, in <module>
TypeError: function expected at most 5 arguments, got 6MicroPython v1.8.6-621-g17ee404e on 2017-05-25; WiPy with ESP32
script:
import machine from machine import SPI, Pin as pin from ssd1306 import SSD1306_SPI as ssd spi = machine.SPI(0,SPI.MASTER, baudrate=2000000, polarity=0, phase=0) oled = ssd(128, 32, spi, pin('P5'), pin('P6'), pin('P7')) ''' oled.fill(0) oled.show() oled.fill(1) oled.show() oled.fill(0) oled.show() oled.text("Hello World!", 0,0) oled.show() ''' So what's wrong with the line: oled = ssd(128, 32, spi, pin('P5'), pin('P6'), pin('P7')) ? In the script itself I see: class SSD1306_SPI(SSD1306): def __init__(self, width, height, spi, dc, res, cs, external_vcc=False):
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login