Enabler Posted March 25, 2024 Posted March 25, 2024 (edited) I'm having trouble getting the sketch to compile. I am using the ESP32 and SSD1322. It is all the code from above except I changed the display (probably also incorrectly coded). The error message is: (I am a coding dummy.) (ESPServo.h is installed and same result when added to the sketch.) Spoiler In file included from c:\Users\A321c\OneDrive\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/Servos.h:6, from c:\Users\A321c\OneDrive\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/DcsBios.h:126, from C:\Users\A321c\AppData\Local\Temp\.arduinoIDE-unsaved2024225-24136-hqzzce.ibti\sketch_mar25a\sketch_mar25a.ino:9: C:\Users\A321c\AppData\Local\Arduino15\libraries\Servo\src/Servo.h:77:2: error: #error "This library only supports boards with an AVR, SAM, SAMD, NRF52 or STM32F4 processor." #error "This library only supports boards with an AVR, SAM, SAMD, NRF52 or STM32F4 processor." ^~~~~ C:\Users\A321c\AppData\Local\Temp\.arduinoIDE-unsaved2024225-24136-hqzzce.ibti\sketch_mar25a\sketch_mar25a.ino:12:10: fatal error: ESP32servo: No such file or directory #include <ESP32servo> ^~~~~~~~~~~~ compilation terminated. exit status 1 Spoiler //F-16 DED for DCS BIOS using 256x64 ER-OLED032-1G from BuyDisplay.com //Final code by JohnnyChicago,a whole lotta font cred to Fusion's wife, and Wiggles5289 on the DCS Forums // adapted by Vinc_Vega to work exclusively with the u8g2 library, new font with inverted chars added, // inverted chars are original ASCII code byte + 100, interprete steering bits (bytes 26 - 29 of each DED line) and plot inverted chars, // unfortunately at the time not all inverted chars are covered by the steering bits (mostly the inverted asterics (*) is missing and therefore is displayed always inveted) #define DCSBIOS_DEFAULT_SERIAL #include "analogWrite.h" //to use the ESP32 chip with DcsBios https://www.arduino.cc/reference/en/libraries/esp32-analogwrite/ #include "DcsBios.h" #include <SPI.h> #include <U8g2lib.h> U8G2_SSD1322_NHD_256X64_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ PA2, /* dc=*/ PA1, /* reset=*/ PA0); // Enable U8G2_16BIT in u8g2.h //U8G2_SH1122_256X64_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 5, /* dc=*/ 21, /* reset=*/ 22); // Enable U8G2_16BIT in u8g2.h // ---------------------------------------------------------------------------------------- // Declaration of the variables // ---------------------------------------------------------------------------------------- String(line1); String(line2); String(line3); String(line4); String(line5); // create a string object for each line to manipulate the content const byte x = 28; // cursor x is always 28 (first char of a line to print) for a 256x64 display const byte y = 13; // cursor y is according to the line number: y = (line number * y) -1) -> first line print at y = 12 // ---------------------------------------------------------------------------------------- // costume F-16 DED font including inversed chars for the u8g2 library // ---------------------------------------------------------------------------------------- /* Fontname: DEDFontNewInv_01 Copyright: Vinc_Vega Glyphs: 142/195 BBX Build Mode: 0 */ const uint8_t u8g2_font_DEDFontNewInv[1755] U8G2_FONT_SECTION("u8g2_font_DEDFontNewInv") = "\216\0\3\4\4\4\3\5\5\10\14\0\377\11\376\11\0\1h\2\315\6\276 \5\0\334\30!\7\222\207" "\30L\4\42\14E\255\30\42$\42AB!\0#\17\226\205\70A\261\230\4\305\213IP,\0$\5" "\0\334\30%\17\226\205\30c!A$br!\12\11\33&\20\226\205XC%\242b##E!&" "#\1'\10B\256\30$\42\0(\12\224\206X\42Er\33\22)\14\224\206\30BcB\62\225\10\1" "*\20\270|\30\17$%Q\310\252\221D)y(+\13f\215X\202BL\202B\0,\10B\207\30" "$\42\0-\6&\235\30\14.\6\42\207\30\4/\12v\215\270\201br\14\5\60\15\226\205Xb$" "Bt\22!\23\2\61\12\224\206XA\42CrA\62\14\226\205\70$H\202\42*\202\14\63\15\226\205" "\30\214bb\243D($\0\64\14\226\205\30\42\362\13\233\240\24\0\65\14\226\205\30\216%\206D($" "\0\66\15\226\205\70$\210%HD($\0\67\13\226\205\30\214br\224\10\0\70\16\226\205\70$H" "($BD($\0\71\16\226\205\70$HD(\205\42%$\0:\7b\227\30\204\4;\11\202\207" "\30\204$\42\0<\11\226\205\230br\225\3=\10f\215\30\354\240\14>\12\226\205\30\242r\223#\0" "\77\17\226\205\70$HbCc\342`\202B\0@\20\226\205\70$g\202%#!#!($\0A" "\15\226\205Xb$HD\17AD\2B\15\226\205\30%H'%BD-\0C\14\226\205\70$H" "\204\62\241\220\0D\13\226\205\30E%\362_T\0E\13\226\205\30\216DD\202\202\14F\13\226\205\30" "\216DD\202\62\2G\14\226\205\70$H\204\42\225P\12H\13\226\205\30B\224\36\202h\22I\11\226" "\205\30L\202rbJ\13\226\205\30L\202r\42\32\3K\17\226\205\30B$(DcD%\42E\2" "L\11\226\205\30\202\362\221\1M\13\226\205\30\201C\17At\22N\15\226\205\30aD%%$\225\250" "\5O\13\226\205\70$HtB!\1P\14\226\205\30%HD-\202\22\1Q\13\226\205\70$H\264" " \221\12R\15\226\205\30%HD'%\62\21\11S\15\226\205\70$\210E\205\202($\0T\12\226" "\205\30L\202\362\11\0U\13\226\205\30B\364\11\205\4\0V\16\226\205\30Bt\22\11\12\242&\4\0" "W\13\226\205\30Btz\10\32\14X\21\226\205\30BD\42AAdbDQ\204\210\4Y\16\226\205" "\30BD\42AAd\202r\2Z\11\226\205\30\214brd[\10\224\206\30JrB\134\7\222\207\30" "\17\3]\10\224\206\30HrR^\14U\246XaC!!\42c\1_\6\26\205\30\6`\10B\257" "\30$\42\0a\15\226\205Xb$\346\20M\310\204\0o\7\63\265\30$\4{\14\226\205X\202\362d" "B&\4\0|\7\222\207\30\17\3}\14\226\205Xb$F\202\362\4\0~\13F\225\70b$\42d" "\42\0\204\10\270|\30\377\320\0\205\13\270|\30K\366\344d\264\0\206\20\270|\30IACA$\42" "#\42\17\37\14\207\26\270|\30*\42$\42\303#\42$\42$\42\303#\42$\42\12\210\5\0\334\30" "\211\22\270|\30i%!\322\202\352\24&\42\22R\226\0\212\23\270|\30k\244CGe!BaB" "\42\303c!\11\213\14\270|\30JF'&\17\37\20\214\14\270|\30LeDv:\63R\215\14\270" "|\30JfGv\42+b\216\20\270|\30\17$%Q\310\252\221D)y(\217\16\270|\30\17L" "F\304\302DF\17\4\220\13\270|\30\77\30\31\235\230\60\221\13\270|\30\37\226\205\37\36\6\222\11\270" "|\30\177\70\62Z\223\14\270|\30\17'Fu\62y\70\224\15\270|\30K\205C\362O\203E\13\225" "\15\270|\30,FeF\66\25\22*\226\20\270|\30\212\303BBF\243\242C\306\302\11\227\15\270|" "\30\311\302F\325\216d\36T\230\22\270|\30IACACACA\303\302E\226\24\231\15\270|\30" "\311\222L\207\215d\36T\232\16\270|\30\212\303B\246\303Br\36T\233\14\270|\30\311\302Fu\262" "\324\0\234\17\270|\30\212\303B\222\7\207\344<\250\0\235\16\270|\30\212\303Br\36\65\32\35T\236" "\15\270|\30\17DF\17GF\17\14\237\16\270|\30\17DF\17GF'&\14\240\12\270|\30M" "u\272S\2\241\15\270|\30\17\312\302\17\303\302\17\2\242\12\270|\30Iw\252S\3\243\17\270|\30" "\212\303BBedENF\13\244\23\270|\30\212\303\42CFbA\42\221D\42\11\17*\245\16\270" "|\30K\205\303Br\226$S\2\246\16\270|\30\251\303BR'\311YT\1\247\16\270|\30\212\303" "B\222l\222<\250\0\250\24\270|\30\251\244CACACACACA\243\242\12\251\14\270|\30" "\311\222\14)Y\26N\252\14\270|\30\311\222\14)\331\324\0\253\21\270|\30\212\303B\222\214\302\204\302" "\204$\217&\254\14\270|\30I\362Y\222\374\224\0\255\14\270|\30\311\302Dv\42\26N\256\14\270|" "\30\311\302Dv\42$c\257\22\270|\30I\222\302D\7\311\12I\207\302\204\204\22\260\12\270|\30I" "\366\263p\2\261\15\270|\30)$B\222%\311\77%\262\24\270|\30)C\262\5\211\5\11\205\11\205" "\11\311i$\1\263\14\270|\30\212\303B\362\237\7\25\264\16\270|\30\251\303Br\26\35\262\324\0\265" "\17\270|\30\212\303B\362)L\224\360(\1\266\17\270|\30\251\303Br\235\24\64$S\2\267\17\270" "|\30\212\303B\246\244FF\302\203\12\270\13\270|\30\311\302D\366i\1\271\13\270|\30I\362\377y" "P\1\272\16\270|\30I\362O#\42\204\204E\13\273\14\270|\30I\362\237%I!I\274\22\270|" "\30I\62\215\210\20\26\25\222\210\14\311\224\0\275\16\270|\30I\62\215\210\20\26\331i\1\276\14\270|" "\30\311\302Fu\62\26N\277\13\270|\30\212\224\354\221P\1\300\11\270|\30K\366\247\5\301\14\270|" "\30\212\204Fv\42$T\302\20\270|\30,f%!DA##\17\17\13\303\10\270|\30\177hN" "\304\14\270|\30KF'&\17\37\16\305\15\270|\30K\205\303\17\313\203E\13\323\13\270|\30i%" "!e\17\77\337\14\270|\30K\366D<X\264\0\340\11\270|\30K\366\247\5\341\14\270|\30K\205" "\303D\366\264\0\342\16\270|\30\37\210\12CD\2\213\36\26\0\0\0\4\377\377\0"; // ---------------------------------------------------------------------------------------- // DCS.BIOS stuff here // ---------------------------------------------------------------------------------------- void onDedLine1Change(char* newValue) { line1 = newValue; } DcsBios::StringBuffer<29> dedLine1Buffer(0x450a, onDedLine1Change); void onDedLine2Change(char* newValue) { line2 = newValue; } DcsBios::StringBuffer<29> dedLine2Buffer(0x4528, onDedLine2Change); void onDedLine3Change(char* newValue) { line3 = newValue; } DcsBios::StringBuffer<29> dedLine3Buffer(0x4546, onDedLine3Change); void onDedLine4Change(char* newValue) { line4 = newValue; } DcsBios::StringBuffer<29> dedLine4Buffer(0x4564, onDedLine4Change); void onDedLine5Change(char* newValue) { line5 = newValue; } DcsBios::StringBuffer<29> dedLine5Buffer(0x4582, onDedLine5Change); // ---------------------------------------------------------------------------------------- // SETUP Section // ---------------------------------------------------------------------------------------- void setup() { DcsBios::setup(); delay(100); // time to setup the display u8g2.begin(); u8g2.clear(); u8g2.setFont(u8g2_font_DEDFontNewInv); } // ---------------------------------------------------------------------------------------- // LOOP Section - Try to keep empty !!! // ---------------------------------------------------------------------------------------- void loop() { DcsBios::loop(); // not all lines are refreshed at the same time, so it sometimes results in missing lines while DED manipulation // therefore, the page buffer method is used to print all lines at once u8g2.firstPage(); do { u8g2.setCursor(x, y-1); u8g2.print(invertChars(line1)); u8g2.setCursor(x, (2 * y) -1); u8g2.print(invertChars(line2)); u8g2.setCursor(x, (3 * y) -1); u8g2.print(invertChars(line3)); u8g2.setCursor(x, (4 * y) -1); u8g2.print(invertChars(line4)); u8g2.setCursor(x, (5 * y) -1); u8g2.print(invertChars(line5)); } while (u8g2.nextPage()); u8g2.updateDisplay(); } // ---------------------------------------------------------------------------------------- // Supporting functions // ---------------------------------------------------------------------------------------- String invertChars(String lineX) { // create a function, applied on each DED line and returning the manipulated string if (lineX.length() > 25) { // look for steering bits only if a line has more than 25 chars for (int j = 0; j < 4; j++) { // go through each of the 4 bytes for (int i = 0; i < 8; i++) { // go through each of the 8 bits per byte if (bitRead(lineX[25 + j], i) == 1) { // start at char number 26 [string index is 25 !!!]; if steering bit equals 1 we found a to be inverted char int inverted = byte(lineX.charAt(j * 8 + i)); // read the byte value of the char from the string object into a local variable lineX.setCharAt(j * 8 + i, inverted + 100); // replace the char by it's inverted version (byte of the char + 100 in the manipulated font) } } } lineX.remove(25, 4); // remove the steering bytes from the string (chars 26 to 29) ... } // ... line is cut to 25 chars, so it passes the next loop without further manipulation (see: if lineX.length > 25) return lineX; // function returns the manipulated line } Edited March 25, 2024 by Enabler GD ViperWorks - YouTube F-16CM Block 50 Replica Sim Pit Construction
Vinc_Vega Posted April 7, 2024 Posted April 7, 2024 (edited) @Enabler Sorry for the late reply, some changes in the Skunkworks fork do that the code no longer compiles if a separate analogWrite library is in use for ESP32 chipsets. Just delete the #include "analogWrite.h" line and add the following line below the #define DCSBIOS_DEFAULT_SERIAL entry #define DCSBIOS_DISABLE_SERVO Regards, Vinc Edited April 8, 2024 by Vinc_Vega Regards, Vinc real life: Royal Bavarian Airforce online: VJS-GermanKnights.de [sIGPIC][/sIGPIC]
LR.Jpatty Posted June 22, 2024 Posted June 22, 2024 @JackFlash can you explain further about the jumpers ? - what are you supposed to solder together? i have the same issue. about to give it up.
JackFlash Posted July 11, 2024 Posted July 11, 2024 On 6/22/2024 at 2:01 AM, LR.Jpatty said: @JackFlash can you explain further about the jumpers ? - what are you supposed to solder together? i have the same issue. about to give it up. I am not at my desk for another two weeks, but I'll get back to you once I have the screen in hand. My latest project, the Multi Function Button Box can be found at Kickstarter.
QuesterYeh Posted September 9, 2024 Posted September 9, 2024 Hello all, I'm testing this sketch but can't get it work. I use the 7-pin version of SSD1322 OLED like this: https://de.aliexpress.com/i/1005005858969975.html?gatewayAdapt=glo2deu The different is this one use 5V power and only have 7 pins (GND/VCC/SCL/SDA/RES/DC/CS), I'd test this one with a mega2560 on F4TS (falcon 4 to serial) and successful, so I think the OLED and connection is ok, but I try all version of codes in this thread with RES/DC/CS settings in my setting (pin 6/5/4) and keep getting empty. I would be appreciate for any help and suggestion.
Vinc_Vega Posted September 9, 2024 Posted September 9, 2024 11 minutes ago, QuesterYeh said: Hello all, I'm testing this sketch but can't get it work. I use the 7-pin version of SSD1322 OLED like this: https://de.aliexpress.com/i/1005005858969975.html?gatewayAdapt=glo2deu The different is this one use 5V power and only have 7 pins (GND/VCC/SCL/SDA/RES/DC/CS), I'd test this one with a mega2560 on F4TS (falcon 4 to serial) and successful, so I think the OLED and connection is ok, but I try all version of codes in this thread with RES/DC/CS settings in my setting (pin 6/5/4) and keep getting empty. I would be appreciate for any help and suggestion. Have you tried the author's suggestions for that kind of displays? https://github.com/olikraus/u8g2/issues/2039 Regards, Vinc Regards, Vinc real life: Royal Bavarian Airforce online: VJS-GermanKnights.de [sIGPIC][/sIGPIC]
QuesterYeh Posted September 9, 2024 Posted September 9, 2024 Thank you Vinc! After I change the command line to this, the OLED come into life!! Looks like 4SPI OLED need to use this command and add clock and data pin to work. U8G2_SSD1322_NHD_256X64_1_4W_SW_SPI u8g2(U8G2_R2, /* clock=*/ 9, /* data=*/ 8,/* cs=*/ 4, /* dc=*/ 5, /* reset=*/ 6); // Enable U8G2_16BIT in u8g2.h Now DED looks function well but only display part of the 5th line. How do I fix my codes? Thanks in advanced! DED.ino
QuesterYeh Posted September 9, 2024 Posted September 9, 2024 Success! After I change the loop part back to: void loop() { u8g2.firstPage(); /*u8g2.clearBuffer(); */ do { u8g2.drawStr(30, 12.8, line1); u8g2.drawStr(30, 25.6, line2); u8g2.drawStr(30, 38.4, line3); u8g2.drawStr(30, 51.2, line4); u8g2.drawStr(30, 64, line5); } while ( u8g2.nextPage() ); u8g2.updateDisplay(); /*u8g2.sendBuffer();*/ DcsBios::loop(); } The DED display correct now! But the invert texts looks like still wip and the refresh speed is slow. The DED is working well now but I'd like to know if there are any way to increase the refresh speed. Thanks for you all to create this sketch!
Vinc_Vega Posted September 9, 2024 Posted September 9, 2024 (edited) 1 hour ago, QuesterYeh said: ... The DED display correct now! But the invert texts looks like still wip and the refresh speed is slow. The DED is working well now but I'd like to know if there are any way to increase the refresh speed. Thanks for you all to create this sketch! Using the U8g2-library's Page Buffer instead of the Full Buffer brings back the full display. That already is part of the adapted code. (Reveal hidden contents) The export of the inverted text seems to be some kind of workaround. Here additional bytes are used to steer the inversion. Therefore, my code searches every long line of text for the additional characters and then has to analyse every byte bitwise for inversion commands. If an inverted bit has been found, the respective character from the text line is read and replaced within the original text. That takes a while, even for a powerful ESP32 chipset. I than removed the additional steering bytes from the line so, that it is not analysed again in the next loop. That already is some optimisation, but I’m not a professional programmer. Even for the asterisk the steering bytes sometime are not exported. Furthermore, the number of pixels (256 x 64) has to be handled by the library every time the display is refreshed. It may help if somebody claims the problematic inversion of the DED line characters within the developer’s forum and ask for more support for cockpit builders. Regards, Vinc PS: Additionally, the above linked code must be changed like posted here: Edited September 9, 2024 by Vinc_Vega Regards, Vinc real life: Royal Bavarian Airforce online: VJS-GermanKnights.de [sIGPIC][/sIGPIC]
QuesterYeh Posted September 10, 2024 Posted September 10, 2024 Thank you Vinc! I'd switch to the code you mentioned, the invert text worked well now. I should satisfied about all these you had achieved, thank you for help me complete my long time dream to make a korry type ICP 2 1
Vinc_Vega Posted September 10, 2024 Posted September 10, 2024 14 minutes ago, QuesterYeh said: Thank you Vinc! I'd switch to the code you mentioned, the invert text worked well now. I should satisfied about all these you had achieved, thank you for help me complete my long time dream to make a korry type ICP Perfect! Regards, Vinc real life: Royal Bavarian Airforce online: VJS-GermanKnights.de [sIGPIC][/sIGPIC]
QuesterYeh Posted September 12, 2024 Posted September 12, 2024 Sorry I would like to ask a stupid question, does the ESP32 runs faster than arduino for DED? I'd integrated all lamps/indicator to my mega2560 with DED, but still wish to know if It is necessary for me to switch to ESP32 XD
Vinc_Vega Posted September 13, 2024 Posted September 13, 2024 (edited) Compared to the 256 kB/ 16 MHz of the Mega 2560, an ESP32 has much more memory available and a clock speed up to 240MHz. Unfortunately, the ESP32 is (yet) not compatible with the DCS-Bios R485 bus and has less I/O pins than a Mega. For more information, see the below link https://www.makerguides.com/esp32-vs-arduino-speed-comparison/ Regards, Vinc Edited September 14, 2024 by Vinc_Vega 1 Regards, Vinc real life: Royal Bavarian Airforce online: VJS-GermanKnights.de [sIGPIC][/sIGPIC]
Snakedoc Posted November 24, 2024 Posted November 24, 2024 Hello @Vinc_Vega thanks for sharing your DED code I'm trying to flash it on an ESP32 board (S2 mini) and I can get it to compile correctly and upload it however afterwards the PC doesn't see the board connected to the PC anymore Here's the process I'm doing: - I'm setting the ESP32S2 in bootloader mode (port changes from COM5 to COM4 in my case) - Uploading the code via Arduino IDE (board ESP32S2 Dev module via COM4) - Unplug the usb and re-plug in the PC but now there's no connection shown to any port If I start DCS with the ESP in bootloader mode there's no display output to the DED and if I reset the board there's no com port I can use because the PC doesn't see it connected to it. Any ideas of what I might be doing wrong? Thank you PS: I also updated the code with the below edit On 4/7/2024 at 8:43 PM, Vinc_Vega said: @Enabler Sorry for the late reply, some changes in the Skunkworks fork do that the code no longer compiles if a separate analogWrite library is in use for ESP32 chipsets. Just delete the #include "analogWrite.h" line and add the following line below the #define DCSBIOS_DEFAULT_SERIAL entry #define DCSBIOS_DISABLE_SERVO Regards, Vinc ASUS ROG STRIX Z490 F-GAMING | i7-10700K | RTX3090 TUF OC | 32GB DDR4 3200Mhz | Windows 10 64bit | Acer Predator X34P | TrackIR 5 | TM Warthog | TM T.Flight Rudder Pedals A-10C | A-10C II | F/A-18C | F-16C | FC3 | PG | Syria | SC Home made F-16C simulator Forum Thread: DCS World forum - The Viper Project - Home Cockpits Instagram: The Viper Project YouTube The Viper Project - Youtube channel
Vinc_Vega Posted November 25, 2024 Posted November 25, 2024 (edited) If you don't see the ESP you probably have a problem with ESP USB drivers or the upload was not successful. Have you tried to load a simpler sketch and confirm running and USB connection? I didn't experienced that until now but haven't used a S2 mini board yet. Sorry for that. Regards, Vinc Edit: It seems that there are common problems to establish an USB connection with that kind of board and found a recommendation with google: "While it’s connected via USB, press and hold the BOOT button. Press and release the RESET button, then release the BOOT button. This puts the S2’s and S3’s USB port into serial mode. If there’s nothing already flashed to it then you may need to do this to get it to show up as a USB device." No idea if that works for you. Edited November 25, 2024 by Vinc_Vega Regards, Vinc real life: Royal Bavarian Airforce online: VJS-GermanKnights.de [sIGPIC][/sIGPIC]
Snakedoc Posted November 25, 2024 Posted November 25, 2024 (edited) 5 hours ago, Vinc_Vega said: If you don't see the ESP you probably have a problem with ESP USB drivers or the upload was not successful. Have you tried to load a simpler sketch and confirm running and USB connection? I didn't experienced that until now but haven't used a S2 mini board yet. Sorry for that. Regards, Vinc Edit: It seems that there are common problems to establish an USB connection with that kind of board and found a recommendation with google: "While it’s connected via USB, press and hold the BOOT button. Press and release the RESET button, then release the BOOT button. This puts the S2’s and S3’s USB port into serial mode. If there’s nothing already flashed to it then you may need to do this to get it to show up as a USB device." No idea if that works for you. Thanks @Vinc_Vega I did manage to connect it and have it detected, I was using the incorrect board type from arduino ide I successfully uploaded your code and it works!! Had to modify the "chip/screen type" line with the following as I'm using a 4 SPI SSD1322 256x64 oled Spoiler U8G2_SSD1322_NHD_256X64_1_4W_SW_SPI u8g2(U8G2_R2, /* clock=*/ 16, /* data=*/ 18,/* cs=*/ 37, /* dc=*/ 33, /* reset=*/ 35); // Enable U8G2_16BIT in u8g2.h If anyone wonders here's the pinout for an S2 mini board: Spoiler OLED_MOSI 18 OLED_CLK 16 OLED_DC 33 OLED_CS 37 OLED_RESET 35 Unfortunately the lag is very long, about 10 seconds before each line refreshes. I'm afraid it's asking too much out of the S2 mini Which board would you recommend? Edited November 25, 2024 by Snakedoc ASUS ROG STRIX Z490 F-GAMING | i7-10700K | RTX3090 TUF OC | 32GB DDR4 3200Mhz | Windows 10 64bit | Acer Predator X34P | TrackIR 5 | TM Warthog | TM T.Flight Rudder Pedals A-10C | A-10C II | F/A-18C | F-16C | FC3 | PG | Syria | SC Home made F-16C simulator Forum Thread: DCS World forum - The Viper Project - Home Cockpits Instagram: The Viper Project YouTube The Viper Project - Youtube channel
Vinc_Vega Posted November 25, 2024 Posted November 25, 2024 (edited) Why don't you use the hardware SPI pins and the respective display driver? That should speed up the thing a bit. 11 MOSI 9 MISO 7 Clock 12 Chip Select If it's still too slow, you may try a full dual core ESP32 dev board. Something like below should do it. Regards, Vinc https://www.espressif.com/en/products/devkits/esp32-devkitc Edited November 25, 2024 by Vinc_Vega Regards, Vinc real life: Royal Bavarian Airforce online: VJS-GermanKnights.de [sIGPIC][/sIGPIC]
Snakedoc Posted November 26, 2024 Posted November 26, 2024 22 hours ago, Vinc_Vega said: Why don't you use the hardware SPI pins and the respective display driver? That should speed up the thing a bit. 11 MOSI 9 MISO 7 Clock 12 Chip Select If it's still too slow, you may try a full dual core ESP32 dev board. Something like below should do it. Regards, Vinc https://www.espressif.com/en/products/devkits/esp32-devkitc I tried but even with those pins there's no change, it's still running very slow. I'll look into another board. Thanks for you help ASUS ROG STRIX Z490 F-GAMING | i7-10700K | RTX3090 TUF OC | 32GB DDR4 3200Mhz | Windows 10 64bit | Acer Predator X34P | TrackIR 5 | TM Warthog | TM T.Flight Rudder Pedals A-10C | A-10C II | F/A-18C | F-16C | FC3 | PG | Syria | SC Home made F-16C simulator Forum Thread: DCS World forum - The Viper Project - Home Cockpits Instagram: The Viper Project YouTube The Viper Project - Youtube channel
Vinc_Vega Posted November 27, 2024 Posted November 27, 2024 Before going to change the microcontroller, did you try to switch to a full framebuffer SPI hardware driver for that display? U8G2_SSD1322_NHD_256X64_F_4W_HW_SPI(rotation, cs, dc [, reset]) [full framebuffer, size = 2048 bytes] If you are not sure for your SPI connection, I already ->here<- explained how to read out the hardware SPI pins for your board in use. You also may try other combinations for the display driver to limit its buffer size: https://github.com/olikraus/u8g2/wiki/u8g2setupcpp#ssd1322-nhd_256x64 Regards, Vinc Regards, Vinc real life: Royal Bavarian Airforce online: VJS-GermanKnights.de [sIGPIC][/sIGPIC]
Vinc_Vega Posted November 30, 2024 Posted November 30, 2024 (edited) On 11/26/2024 at 9:55 PM, Snakedoc said: I tried but even with those pins there's no change, it's still running very slow. I'll look into another board. Thanks for you help @Snakedoc I organized an ESP32 S2 mini over the weekend and plugged it to my SH1122 display (256x64 px). There is a verry good reaction time, no delays between page flipping. Therefore, the microcontroller is good for that purposes and you don’t have to change it. If there still are timing issues or lags, you really may try other graphic drivers (like the below "full buffer 4 wire hardware SPI driver"). My pinout to the display is as follows (hardware SPI): GND -> GND VCC -> 3.3V SCL -> 7 (SCK) SDA -> 11 (MOSI) RST -> 8 DC -> 6 CS -> 12 (CS) I use the following line within my sketch U8G2_SH1122_256X64_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 12, /* dc=*/ 6, /* reset=*/ 8); Regards, Vinc Edited November 30, 2024 by Vinc_Vega Regards, Vinc real life: Royal Bavarian Airforce online: VJS-GermanKnights.de [sIGPIC][/sIGPIC]
Snakedoc Posted December 1, 2024 Posted December 1, 2024 16 hours ago, Vinc_Vega said: @Snakedoc I organized an ESP32 S2 mini over the weekend and plugged it to my SH1122 display (256x64 px). There is a verry good reaction time, no delays between page flipping. Therefore, the microcontroller is good for that purposes and you don’t have to change it. If there still are timing issues or lags, you really may try other graphic drivers (like the below "full buffer 4 wire hardware SPI driver"). Thank you Vinc, very kind of you I am still struggling though (screen won't turn on if I change the code as above) Couple of questions: 1. What board do you select in arduino ide to compile & upload the sketch? 2. my screen is an SSD1322, am I correct in setting this line up for the hardware SPI? U8G2_R0 or U8G2_R2? when I change this line and reorganise the connections, screen doesn't turn on Quote U8G2_SSD1322_NHD_256X64_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 12, /* dc=*/ 6, /* reset=*/ 8); Sorry for these noob questions, I am new to arduino & ESP in general regards ASUS ROG STRIX Z490 F-GAMING | i7-10700K | RTX3090 TUF OC | 32GB DDR4 3200Mhz | Windows 10 64bit | Acer Predator X34P | TrackIR 5 | TM Warthog | TM T.Flight Rudder Pedals A-10C | A-10C II | F/A-18C | F-16C | FC3 | PG | Syria | SC Home made F-16C simulator Forum Thread: DCS World forum - The Viper Project - Home Cockpits Instagram: The Viper Project YouTube The Viper Project - Youtube channel
Vinc_Vega Posted December 1, 2024 Posted December 1, 2024 Hi @Snakedoc 1) for the test I used the LOLIN S2 Mini board from the esp32 menu in the Arduino IDE to upload a sketch. For details see here: https://www.wemos.cc/en/latest/tutorials/s2/get_started_with_arduino_s2.html 2) The driver seems to be the right one (4 wire SPI), R0 and R2 is the rotation of the screen. According to the display's pinout found at Aliexpress, I recomment to connect it as follows: Display S2 Mini 1 VSS GND 2 VCC 3.3V 4 CLK 7 (SCL) 5 DIN 11 (MOSI) 14 DC 6 (can be changed to any digital pin) 15 RES 8 RST (can be changed to any digital pin) 16 CS 12 CS (can be changed to any digital pin) I've ordered a pair of the SSD1322 displays from Aliexpress, but it'll take a while to get it from China. I'll give an update when they have arrived. Regards, Vinc Regards, Vinc real life: Royal Bavarian Airforce online: VJS-GermanKnights.de [sIGPIC][/sIGPIC]
Snakedoc Posted December 1, 2024 Posted December 1, 2024 (edited) Thank you @Vinc_Vega Looking forward to your findings! the connections are as you’ve indicated but still no output when I change to this driver by the way, maybe you know already but some of these screens don’t come by default as SPI, to make them as such you’ll have to re-solder a small jumper from “R6” to “R5” Edited December 1, 2024 by Snakedoc ASUS ROG STRIX Z490 F-GAMING | i7-10700K | RTX3090 TUF OC | 32GB DDR4 3200Mhz | Windows 10 64bit | Acer Predator X34P | TrackIR 5 | TM Warthog | TM T.Flight Rudder Pedals A-10C | A-10C II | F/A-18C | F-16C | FC3 | PG | Syria | SC Home made F-16C simulator Forum Thread: DCS World forum - The Viper Project - Home Cockpits Instagram: The Viper Project YouTube The Viper Project - Youtube channel
Vinc_Vega Posted December 1, 2024 Posted December 1, 2024 (edited) @Snakedoc According to the description in the pic from Amazon (see below), if R5 and R8 are connected, it should have set to the 4 wire SPI. That combination I can see in your picture. Did you de-solder R6 and put the resistor in place of R5 ? If that doesn't work, we have to do more investigations when my displays have arrived. Regards, Vinc Edited December 1, 2024 by Vinc_Vega Regards, Vinc real life: Royal Bavarian Airforce online: VJS-GermanKnights.de [sIGPIC][/sIGPIC]
Recommended Posts