Closed ayhlai closed 6 years ago
I haven't tried a Raspberry 3 or the latest Raspian image; it is entirely possible that some SPI implementation detail changed (unlikely though).
Also since you have two boards, it is unlikely (or very unlucky) that both are dead. Looking at the pic, the soldering doesn't look too good on one of them. Also interesting is that one OLED display is smaller than the other - what size was it? Where did you buy them from?
One thing I found in the past though: using cheap breadboards can cause problems because the metal inserts dont grip the male pins properly (see this youtube video about 14mins in).
I always tend to use the female-female jumper cables like these https://www.ebay.co.uk/itm/10cm-Female-to-Female-Jumper-Wire-for-Breadboard-Prototyping-/262403793547
Finally had time to test this out. I have took your advice and removed the need for breadboard, directly jumping with cable.
It went one step further, running below:
$ sudo modprobe fbtft_device name=freetronicsoled128
$ dmesg | grep fbtft_device
[ 63.900658] fbtft_device: module is from the staging directory, the quality is unknown, you have been warned.
[ 63.903323] fbtft_device: GPIOS used by 'freetronicsoled128':
[ 63.903337] fbtft_device: 'reset' = GPIO24
[ 63.903345] fbtft_device: 'dc' = GPIO25
$ con2fbmap 1 1
then do a "sudo reboot" , I managed to see something on screen, I guess that confirmed wiring is ok.
However, when I run any luma.examples, I still get a blank display without any error. eg.
pi@raspberrypi:~/luma.examples $ python examples/maze.py -f conf/ssd1351.conf --framebuffer=full_frame
Version: luma.oled 2.4.0 (luma.core 1.7.2)
Display: ssd1351
Interface: spi
Dimensions: 128 x 128
------------------------------------------------------------
pi@raspberrypi:~/luma.examples $ python examples/welcome.py -f conf/ssd1351.conf --framebuffer=full_frame
Version: luma.oled 2.4.0 (luma.core 1.7.2)
Display: ssd1351
Interface: spi
Dimensions: 128 x 128
------------------------------------------------------------
Result: Nothing on display
Thanks for the help so far!
Ok, what is interesting is that when you have it working with the kernel driver, you have pin 24 connected to reset, and pin 25 connected to the data/command line.
[ 63.903337] fbtft_device: 'reset' = GPIO24
[ 63.903345] fbtft_device: 'dc' = GPIO25
However, if you follow the instructions at https://luma-oled.readthedocs.io/en/latest/hardware.html#spi you will see that the default pins for these two lines are the other way around.
Therefore I would suggest either:
--gpio-data-command=25
and --gpio-reset=24
to override the defaults when running the demos.Either should work.
It's working!! Thanks so much for this brilliant library.
python examples/animated_gif.py -f conf/ssd1351.conf --framebuffer=full_frame --gpio-data-command=25 --gpio-reset=24 --framebuffer=full_frame
Tried a few examples and cannot see anything on the display. No errors.
I have no problem with i2c displays.
Checked the SPI port has ok
The program runs without error, but I see nothing on the display :
Hardware: Tried both Pi 3 Model B and Pi 3 Model B+. Same result OS: Raspbian Release date:2018-03-13 Kernel version:4.9
Here are some photos. I have 2 displays of the same ssd1351 ic. Both yield the same results (nothing shown on display).
Thanks very much in advance!