Hi,
i'm working with Teensy 4.0 connected via USB to my PC. I'm newbie in firmware develop, sorry if it's a stupid question.
PC and Teensy are communicating correctly and the speed of communication is good.
I decide to connect a little display (128x64) via i2c using <Adafruit_GFX.h> <Adafruit_SSD1306.h> driver.
After this I noticed a big slowdown in the communication. So I would to understand if there is a best practice to manage a display refresh in order to mantein a good serial communication speed.
This is the easy code that I'm testing
//Setup
if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { // Address 0x3C for 128x64
Serial.println(F("SSD1306 allocation failed"));
for(;; // Don't proceed, loop forever
}
//LOOP
display.clearDisplay(); //Pulisce il buffer da inviare al display
display.setCursor(0,0); //Imposta la posizione del cursore (Larghezza,Altezza)
display.println("BERNIE"); //Stringa da visualizzare
int gain = gain_rotary.getValue();
display.print("GAIN: ");
display.println(gain);
display.display();
Is there a best practice to manage a display refresh? dedicated thread? Or other solution? Asynch method!?
I just think to move on a SPI Display to increase the communication speed.
Andre
i'm working with Teensy 4.0 connected via USB to my PC. I'm newbie in firmware develop, sorry if it's a stupid question.
PC and Teensy are communicating correctly and the speed of communication is good.
I decide to connect a little display (128x64) via i2c using <Adafruit_GFX.h> <Adafruit_SSD1306.h> driver.
After this I noticed a big slowdown in the communication. So I would to understand if there is a best practice to manage a display refresh in order to mantein a good serial communication speed.
This is the easy code that I'm testing
//Setup
if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { // Address 0x3C for 128x64
Serial.println(F("SSD1306 allocation failed"));
for(;; // Don't proceed, loop forever
}
//LOOP
display.clearDisplay(); //Pulisce il buffer da inviare al display
display.setCursor(0,0); //Imposta la posizione del cursore (Larghezza,Altezza)
display.println("BERNIE"); //Stringa da visualizzare
int gain = gain_rotary.getValue();
display.print("GAIN: ");
display.println(gain);
display.display();
Is there a best practice to manage a display refresh? dedicated thread? Or other solution? Asynch method!?
I just think to move on a SPI Display to increase the communication speed.
Andre