sumotoy / ssd_13xx Goto Github PK
View Code? Open in Web Editor NEWA very fast and full featured driver for SSD1331/22/32/51 Oled's compatible with Teensy's and many other MCU's
License: GNU General Public License v3.0
A very fast and full featured driver for SSD1331/22/32/51 Oled's compatible with Teensy's and many other MCU's
License: GNU General Public License v3.0
I've been successfully using this library for SSD1331 screens, but I recently got one with a SSD1351 controller (just like this one) and the screen does respond, turn on, but every frame is drawn like white noise.
I followed the instructions and uncommented the SSD1351 include and commented the other ones.
I own a SSD1331 0.95inch RGB OLED from Waveshare (resolution 96x64, RGB, 65K colorful, specifications here.
I have been able to find how to connect pins on an Arduino UNO and the use of Adafruit library for Arduino allow me to display correctly (but very slow).
I cannot figure out how to connect it to use SSD_13XX. Compilation and upload of code to the UNO is okay but nothing is displayed (serial shows the appropriate text, so firmware is running). Is there some schema how to make the appropriate connection.
Thanks a lot.
This lib is great and working well with ESP32 Devkit V1. Just remember to pull up the OLED CS line otherwise during power up the line will float and the display may not init properly.
Tip:
I use 3 x SSD1331 oleds in parallel on the SPI bus with shared CS and tied high RST. This arrangement highlights any startup reliability issues as sometimes 1 will fail indicating a problem with my circuit layout or timing. If all 3 constantly work as expected then I feel I'm good to go. I do the same with I2C.
Hello, I didn't find any guide on how to draw own images. How can I do this? Sorry if I'm missing something.
Hi Max, thanks for your driver.
I am using the sloeber-eclipse-C IDE to compile my ESP8266 sketches. For now I got every Library runnig but I have some wired compile issues with your lib.
Can you be so kind and have a look on it?
Trying to compile the ESP8266 Basic Setup:
C:\Users\wurst\Downloads\SSD_13XX-masterNew\SSD_13XX-master_images\eye\eye0.c:32:67: error: 'RLE_no' undeclared here (not in a function)
static const tPicture eye0 = { image_data_eye0, 48, 48, 2304, 16, RLE_no};
^
C:\Users\wurst\Downloads\SSD_13XX-masterNew\SSD_13XX-master_images\eye\eye0.c:32:1: error: unknown type name 'tPicture'
static const tPicture eye0 = { image_data_eye0, 48, 48, 2304, 16, RLE_no};
COMPLETE STACK:
15:57:23 **** Incremental Build of configuration Release for project displaySmallColor ****
"C:\DEV\nodeMCU\sloeber\arduinoPlugin\tools\make\make" all
'Building file: ../.ino.cpp'
'Starting C++ compile'
"C:\DEV\nodeMCU\sloeber\arduinoPlugin\tools\esp8266\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:/DEV/nodeMCU/sloeber/arduinoPlugin/packages/esp8266/hardware/esp8266/2.1.0/tools/sdk/include" -c -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=160000000L -DARDUINO=10609 -DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266 -DESP8266 -I"C:\DEV\nodeMCU\sloeber\arduinoPlugin\packages\esp8266\hardware\esp8266\2.1.0\cores\esp8266" -I"C:\DEV\nodeMCU\sloeber\arduinoPlugin\packages\esp8266\hardware\esp8266\2.1.0\variants\nodemcu" -I"C:\Users\wurst\Downloads\SSD_13XX-masterNew\SSD_13XX-master" -I"C:\DEV\nodeMCU\ESP8266LibsNDriver\ESP8266Libs\Adafruit-GFX-Library-master" -I"C:\DEV\nodeMCU\sloeber\arduinoPlugin\packages\esp8266\hardware\esp8266\2.1.0\libraries\SPI" -I"C:\DEV\nodeMCU\sloeber\arduinoPlugin\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi" -I"C:\DEV\nodeMCU\sloeber\arduinoPlugin\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi\src" -MMD -MP -MF".ino.cpp.d" -MT".ino.cpp.o" -D__IN_ECLIPSE__=1 -x c++ "../.ino.cpp" -o ".ino.cpp.o" -Wall
'Finished building: ../.ino.cpp'
' '
'Building file: C:\Users\wurst\Downloads\SSD_13XX-masterNew\SSD_13XX-master_images\eye\eye0.c'
'Starting C compile'
"C:\DEV\nodeMCU\sloeber\arduinoPlugin\tools\esp8266\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-gcc" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:/DEV/nodeMCU/sloeber/arduinoPlugin/packages/esp8266/hardware/esp8266/2.1.0/tools/sdk/include" -c -Os -g -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -falign-functions=4 -MMD -std=gnu99 -ffunction-sections -fdata-sections -DF_CPU=160000000L -DARDUINO=10609 -DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266 -DESP8266 -I"C:\DEV\nodeMCU\sloeber\arduinoPlugin\packages\esp8266\hardware\esp8266\2.1.0\cores\esp8266" -I"C:\DEV\nodeMCU\sloeber\arduinoPlugin\packages\esp8266\hardware\esp8266\2.1.0\variants\nodemcu" -I"C:\Users\wurst\Downloads\SSD_13XX-masterNew\SSD_13XX-master" -I"C:\DEV\nodeMCU\ESP8266LibsNDriver\ESP8266Libs\Adafruit-GFX-Library-master" -I"C:\DEV\nodeMCU\sloeber\arduinoPlugin\packages\esp8266\hardware\esp8266\2.1.0\libraries\SPI" -I"C:\DEV\nodeMCU\sloeber\arduinoPlugin\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi" -I"C:\DEV\nodeMCU\sloeber\arduinoPlugin\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi\src" -MMD -MP -MF"SSD_13XX-master_images\eye\eye0.c.d" -MT"SSD_13XX-master_images\eye\eye0.c.o" -D__IN_ECLIPSE__=1 "C:\Users\wurst\Downloads\SSD_13XX-masterNew\SSD_13XX-master_images\eye\eye0.c" -o "SSD_13XX-master_images\eye\eye0.c.o" -Wall
C:\Users\wurst\Downloads\SSD_13XX-masterNew\SSD_13XX-master_images\eye\eye0.c:27:1: error: unknown type name 'uint16_t'
static const uint16_t image_data_eye0[2304]
^
C:\Users\wurst\Downloads\SSD_13XX-masterNew\SSD_13XX-master_images\eye\eye0.c:32:1: error: unknown type name 'tPicture'
static const tPicture eye0 = { image_data_eye0, 48, 48, 2304, 16, RLE_no};
^
C:\Users\wurst\Downloads\SSD_13XX-masterNew\SSD_13XX-master_images\eye\eye0.c:32:1: warning: initialization makes integer from pointer without a cast [enabled by default]
C:\Users\wurst\Downloads\SSD_13XX-masterNew\SSD_13XX-master_images\eye\eye0.c:32:1: warning: (near initialization for 'eye0') [enabled by default]
C:\Users\wurst\Downloads\SSD_13XX-masterNew\SSD_13XX-master_images\eye\eye0.c:32:1: warning: excess elements in scalar initializer [enabled by default]
C:\Users\wurst\Downloads\SSD_13XX-masterNew\SSD_13XX-master_images\eye\eye0.c:32:1: warning: (near initialization for 'eye0') [enabled by default]
C:\Users\wurst\Downloads\SSD_13XX-masterNew\SSD_13XX-master_images\eye\eye0.c:32:1: warning: excess elements in scalar initializer [enabled by default]
C:\Users\wurst\Downloads\SSD_13XX-masterNew\SSD_13XX-master_images\eye\eye0.c:32:1: warning: (near initialization for 'eye0') [enabled by default]
C:\Users\wurst\Downloads\SSD_13XX-masterNew\SSD_13XX-master_images\eye\eye0.c:32:1: warning: excess elements in scalar initializer [enabled by default]
C:\Users\wurst\Downloads\SSD_13XX-masterNew\SSD_13XX-master_images\eye\eye0.c:32:1: warning: (near initialization for 'eye0') [enabled by default]
C:\Users\wurst\Downloads\SSD_13XX-masterNew\SSD_13XX-master_images\eye\eye0.c:32:1: warning: excess elements in scalar initializer [enabled by default]
C:\Users\wurst\Downloads\SSD_13XX-masterNew\SSD_13XX-master_images\eye\eye0.c:32:1: warning: (near initialization for 'eye0') [enabled by default]
C:\Users\wurst\Downloads\SSD_13XX-masterNew\SSD_13XX-master_images\eye\eye0.c:32:67: error: 'RLE_no' undeclared here (not in a function)
static const tPicture eye0 = { image_data_eye0, 48, 48, 2304, 16, RLE_no};
^
C:\Users\wurst\Downloads\SSD_13XX-masterNew\SSD_13XX-master_images\eye\eye0.c:32:1: warning: excess elements in scalar initializer [enabled by default]
static const tPicture eye0 = { image_data_eye0, 48, 48, 2304, 16, RLE_no};
^
C:\Users\wurst\Downloads\SSD_13XX-masterNew\SSD_13XX-master_images\eye\eye0.c:32:1: warning: (near initialization for 'eye0') [enabled by default]
SSD_13XX-master_images\eye/subdir.mk:72: recipe for target 'SSD_13XX-master_images\eye\eye0.c.o' failed
make: *** [SSD_13XX-master_images\eye\eye0.c.o] Error 1
15:57:25 Build Finished (took 1s.812ms)
Thanks
https://github.com/sumotoy/SSD_13XX/blob/master/_includes/_common_16bit_colors.h
The codes of pink and meganta colors in this file are the same. That's why the library throws an error. It needs to be replaced urgently!!!
SSD1531 does not work at 96Mhz
Either shows garbage pixels or nothing at all.
Hi there -- I'm trying to drive an SSD1322 OLED display as fast as possible using a Teensy 3.1 and, well, this library looks perfect. Faster than anything else I've tried, in theory. I just can't find any references to the 1322 in the released header files, though, and support for that chipset is still listed as "under development".
Has there been any development in this direction? Thanks!
Hi i tested the code / library on the esp32 the i2c scanner founds the display SSD13XX but nothing is shown on the display when i try to use an example code. on the eso8266 it runs smooth
thanks in advantage.
I am using SSD1331 OLED, it's a 96 x 64 OLED display. I want to print a 64 x 64 QR code on display, but I can't see anything on display. I looked up source code in SSD_13XX.cpp, and found this in line 1921:
if ((x + iWidth) * scale >= _width || (y + iHeight) * scale >= _height) return;//cannot be
When drawIcon is called, it always return, because my icon is:
static const tIcon qrcode1 = { image_data_qrcode1, 64, 64, 512, RLE_no };
That is the reason in my case. so can't I draw a height 64 icon? why? thanks a lot.
I have been trying to find a library for the SSD1357. How much adapting would need to be done?
Hi,
I used the SSD1331 from adafruit with a wemos d1 mini pro (ESP8266, CS on D3, DC on D0, RST with 4,7k on 5V)
Text is not readable (from tft.print("HHH") I see only the middle line of the H)
tft.drawLine(20, 20, 40, 40, BLUE) is visible, but tft.drawCircle and tft.drawRoundRect don't show anything.
Thank you for the lib and for your help.
Greetings
With separate CS and DC or shared DC, shared CLK and DOUT, 2 screen will draw over each other displaying a combined picture of draw commands sent each of the display objects.
I have 2 different SSD1331s with 7 pins from two different vendors on Amazon. They work ok with Arduino Mega 2560 using adafruit library. When connecting to a Teensy 3.2 and using this library I get the serial output from basicTest but nothing shows up on the screen. I have SSD_1331_96x64.h uncommented in settings file. Suggestions? I also posted on the pjrc.com forum.
Hi, when the display is stuck (because of invalid garbage data received), it's really hard to reset it. Each time I wait until it discharges completely and it randomly begin to work again if I'm lucky (until next garbage data). How do you deal with it on your setup? I haven't noticed that problem with adafruit library while watching demo, but your lib is very fast so I would like to keep using it, the only problem is hard to reset (or maybe I'm doing something wrong?). Thank you.
Found DIM mode commented out. Tested with it re-enabled and it worked but found changing to NORMAL didn't recover from DIM mode.
Hi. Great library, been using it a while.
Think I found a small bug in the drawRect method.
For instance tft.fillRect(120, 15, 8, 8, BLACK); works as expected, but
tft.drawRect(120, 15, 8, 8, BLACK) does not.
In the drawRect method I think the lines
if (x + w >= _width) return;
if (y + h >= _height) return;
should be
if (x + w > _width) return;
if (y + h > _height) return;
Don't know if this might mess up something else, but seems to be working fine for me.
Thank you for your work and your attention.
First of all, thank you for this library that is so much faster than the Adafruit's one ! It's absolutely brilliant !
drawCircle and fillCircle start with the instruction
if (x+(radius) >= _width || y+(radius) >= _height) return;//radius*2
Is there a particular reason for this ?
Thanks again.
Hi,
i tested your driver for ssd1351, very good!
have you this driver for work with spi2 (HSPI) of the ESP32?
Thanks
Umberto
I just hooked this up to a Tindie_Tlera Ladybug and it is 18 times faster over a test suite that goes from 18323.891 ms down to 946.418 ms for a combined set of 18 tests - most just POP the image onto the screen! This is on an 80 MHz STM. The tests look like they run the same - but too fast to tell :)
It has room for optimization with #ifdef. Wondering (hoping) if you are back online Sumotoy and would take a PULL request if I got the changes done right?
Small things like it has twin SPI, can do 16 bit writes for color - and should have direct port writes to replace digitalWrite()'s that I didn't test yet. There may be others.
Your library has the library.json
and library.properties
files, but is not listed in the Arduino Library Manager at the moment.
I was wondering if you could add it to the official list of libraries?
Instructions are here: https://github.com/arduino/Arduino/wiki/Library-Manager-FAQ#how-can-i-add-my-library-to-library-manager
Hi,
I'm using the library with a ssd1332, and text is mirrored, I can't seem to find anything in the code to mirror the text, have I missed something?
Just wanted to drop by and say "Thank you!". Got my OLED a couple of days ago, started to play around with the adafruit library and was very disappointed about the slow updates. Thought this could not be it, then I studied the datasheet, and found out that they were not utilizing the hardware to the fullest. Fortunately I googled for an alternative and found this.
Saved me days - thank you.
Feel free to close (github is missing a PM system)...
It would be so cool to have your library compiled and compatible with NodeJS in order to use it on a Raspberry PI.
I am ready to help all the NodeJS stuff I am able to...
Is this library compatibility wu=ith this module and how the wiring goes up?
https://sea.banggood.com/0_95-Inch-7pin-Full-Color-65K-Color-SSD1331-SPI-OLED-Display-For-Arduino-p-1068167.html?akmClientCountry=MY&p=DQ30066511122014069J&utm_campaign=educ8stv&utm_content=huangwenjie&cur_warehouse=CN
Hi!
Thankls for sharing this!
I got a small Issue, how can I load in a custom font? I managed it with adafruit GFX due to a webconverter. Now I am quite unsure how to get these .c files for fonts. Hopefully someone can help me?
I saw a comment that the scroll implementation is a work in progress, is that still true? I was unable to get it working.
I also saw this on youtube which is silky smooth scrolling: https://github.com/sumotoy/SSD_13XX/issues
is this something only the 32 can do via vspi or should the 8266 also be able to do this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.