-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extremly slow refresh time #51
Comments
Try to use i2c driver from greiman instead of slow buggy Wire. |
My guess is that you have a clear display call in your main loop. This will cause flickering. |
I forgot to mention that I am using wire but all the demos work well. Not my code though. I was thinking if there is any way to write multiple lines at once. code here: ` Adafruit_SSD1306 display(-1); int menuEncoderVar1 = 0; int brightness = 25; long currentmicros = 0; void rotate() { void singleClick() { void setup() { display.setFont(&FreeSans12pt7b); void floatIco (int floSpeed, int floSteps) { void topRow() { void loop() { animationSpeedVar = map(animationSpeed, 1, 400, 10000, 5); if (menuVar1 == 0) {//------------Main-menu-----------------
} if (menuVar1 == 1) {
} if (menuVar1 == 3) {
} if (menuVar1 == 5) {
} if (menuVar1 == 7) {
} if (menuVar1 == 9) {
} if (menuVar1 == 11) {
} if (menuVar1 == 29) { //---------------Animations-Speed-submenu----------------
} if (menuVar1 == 31) { //----------------Animations-Colors-submenu-----------
} display.display(); |
You're clearing the display each time through your loop. Remember that there is no buffer with this library. -Edit- You're not even using this library in your code? You're using an Adafruit one. |
Closed - not this library.
|
sorry I sent the wrong code, please reopen this issue |
`#include <SSD1306Ascii.h> int menuEncoderVar1 = 0; int brightness = 25; long currentmillis = 0; void rotate() { void singleClick() { void setup() { oled.setFont(Cooper19); void floatIco (int floSpeed, int floSteps) { void topRow() { void loop() { if (menuVar1 == 0) {//------------Main-menu-----------------
} if (menuVar1 == 1) {
} if (menuVar1 == 3) {
} if (menuVar1 == 5) {
} if (menuVar1 == 7) {
} if (menuVar1 == 9) {
} if (menuVar1 == 11) {
} if (menuVar1 == 29) { //---------------Animations-Speed-submenu--------------------HERE-HERE-HERE-HERE--------
} if (menuVar1 == 31) { //----------------Animations-Colors-submenu-----------
} |
Looks like you clear the screen each time you enter loop so it will flicker. Clearing the screen requires writing 1024 bytes of zero to the display memory. oled,clear() takes about 46 ms. Run this code in loop. It flickers.
|
The display is really flickering. If you want my code, let me know. Thanks for response
The text was updated successfully, but these errors were encountered: