ssd1306 driver on WiPy via SPI?

Questions and discussion about The WiPy 1.0 board and CC3200 boards.
Target audience: Users with a WiPy 1.0 or CC3200 board.
Olias
Posts: 1
Joined: Fri Jul 21, 2017 8:18 pm

ssd1306 driver on WiPy via SPI?

Postby Olias » Fri Jul 21, 2017 8:27 pm

It appears the ssd1306 driver (https://github.com/micropython/micropyt ... ssd1306.py) isn't working for the WiPy. I've had to modify the driver to change pin.high() -> pin.value(1) and pin.low() -> pin.value(0) but clearly there is something else going on.

I have an Adafruit 128x32 OLED SSD1306 display wired to my WiPy 2.0 (via Expansion Board) as follows:

WiPy->SSD1306
P5->D/C
P6->RST
P7->CS
P10->CLK
P12->DATA
3V3->VIN
GND->GND

This is the code I am using to test. I get nothing - no errors, nothing on the screen. Is it wired correctly? Something else messed up?

from machine import SPI, Pin
from ssd1306 import SSD1306_SPI as ssd
spi = SPI(0, SPI.MASTER, baudrate=100000, polarity=0, phase=0)
o = ssd(128,32,spi,Pin('P5'),Pin('P6'),Pin('P7'))
o.fill(1)
o.show()

The OLED is good as I've used it with the Pyboard and it works. Just not with the WiPy. Any assistance greatly appreciated.

User avatar
deshipu
Posts: 1193
Joined: Thu May 28, 2015 5:54 pm

Re: ssd1306 driver on WiPy via SPI?

Postby deshipu » Mon Jul 24, 2017 10:02 am

Do you happen to have a logic analyzer, so that you can see what is actually being sent?


Who is online

Users browsing this forum: No registered users and 2 guests