Comments (8)
Hey Jack,
I ran into this same problem, and found this solution https://github.com/greiman/SSD1306Ascii It's very light weight but drops some features for it. Good luck!
from adafruit_ssd1306.
If you have a 128x64 display, each pixel needs 1 bit in RAM to represent whether you want it on or off. There is no way around this. 8192 bits, or 1024 bytes of RAM are required in the form of a buffer, namely; static uint8_t buffer[SSD1306_LCDHEIGHT * SSD1306_LCDWIDTH / 8]
A few more bytes are required for various settings and housekeeping but this buffer represents the bulk of it. Using a smaller number of pixels such as 128x32 reduces the buffer size. But, depending on what your project needs to do, you might try to reuse that buffer for other purposes when it is not actively being used by the SSD1306 library. As I understand it, the buffer is only accessed while laying out the screen and during calls to display.display(). If you write your sketch so that everything that goes onscreen is generated at the beginning of loop() followed by display.display(),of loop(), then for the rest of loop(), buffer and its 1024 bytes will be at your disposal.
I have not tried this, so cannot confirm that it works
from adafruit_ssd1306.
thank you - however when I compile my code with your library - at compile time your library needs 1024 bytes hence it is greater than the 2k bytes of ram that my arduino has (my other code uses 1.2 k).
Why does your code need this RAM at comlpile time?
from adafruit_ssd1306.
1024 bytes do fit into 2k bytes of RAM, please post your compile log @geetee24
from adafruit_ssd1306.
Would it be possible to take that big static array away by moving it into some sort of loop that iterates over each pixel (or at least each 8 pixels) rather than taking up that much memory to begin with? I haven't had time to dive deep into the library to look into this yet.
I think this would be similar to what was described before by using that memory when it's not being used, but this approach would ensure that doesn't happen.
from adafruit_ssd1306.
you can't read data from the display so we have to buffer the entire thing. no fix possible - its just how this chip works! :)
from adafruit_ssd1306.
I'm trying to accomplish a very simple task. (I know they all say that) I'm using an Arduino Uno R3, RF69 Radio RX and a OLED (Adafruit_SSD1306 display(OLED_RESET)) display. I want to display two pieces of information send from another Arduino radio onto the OLED. That's it... It turns out that that would take 102% of memory. It doesn't look possible to use these in combination. I see that the OLED is a hog, 74% of memory. Can you recommend any work arounds such as a Arduino Mega or another display device that uses less memory and is good looking? I'm using it in my RV displaying Temperature and voltage at the drivers position transmitted from an equipment cabinet.
Thanks
Jack
from adafruit_ssd1306.
Hi Jack
Late reply, but I just started looking at Arduino and OLED. The U8GLIB library seems to offer more control of the amount of resources used. You can tell it to use 1 page for buffering, 2 pages or Full buffering. At 1 page, instead of 70-80% utilisation, it uses about 20%. Much more reasonable.
As a con, the drawing is lamentably slow, and the library isn't as easy to use as the adafruit. Especially the u8G2 library, which I can't get to work properly.
For slow graphics apps, the U8GLIB is a good option.
from adafruit_ssd1306.
Related Issues (20)
- .
- Where is the method "print" located in this library? I was trying to find the implementatin of the method "print" and "println" for the oled display. I found the line in the example "display.println(F("Hello, world!"));" But where is this method? HOT 2
- display.display(), arbitrary display area refresh
- not able to run ESP32 and SSD1306 128x64 i2c HOT 4
- display.begin() always true HOT 3
- Using clearDisplay() in the main loop causes Arduino Micro / Pro Micro bootloader to crash HOT 5
- reset pin not activated properly on stm32 bluepill
- Character's size HOT 2
- SPI communication is very slow
- pgmspace.h: No such file or directory for Raspberry Pi Pico HOT 4
- Custom i2c pins for ESP32 HOT 2
- The problem with the screen
- Cannot compile for Arduino Nano RP2040 Connect
- lcd oled 64x48 no working
- inharmony with SD.h
- Teensy issue on top row. HOT 2
- error when several ssd1306 128x64 HOT 1
- Not compatible with ATmega328PB (Watterrott Pro Mini PB)? HOT 1
- [Feature Request] One instance - multiple devices
- adc_timer_dma and Adafruit SSD1306_128x32_i2c reboot loop HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adafruit_ssd1306.