GearUpper Posted November 13, 2020 Posted November 13, 2020 Hello guys! I have been following this group for some months to better understand DCS-BIOS and cockpit building, learning as I go. THANK YOU ALL SO MUCH!!! I am currently building a simplified F16 simpit (which can be used with other aircraft) and adding all sorts of new stuff as I better understand Arduino! I try really hard to find out how to do stuff on my own, I know the basics (electronic and programming), but as things get more complicated I really need some expert advice. So I have this idea to emulate the mechanical-type F16 Speed Brake Indicator, which basically shows 3 images depending if the Speed brakes are Closed, Open or there is an electrical loss. I want to use a 128x64 OLED which has just the right size and looks really cool. I have tested the display with its own code, transitioning the 3x images, which works fine on its own (see picture). However, I want to display these images inside as part of a DCS-Bios Arduino code, that also takes care of all the Landing Gear and HMCS panel. Each image will come up depending on the position of the Speed Brake (inside an IF statement). But unfortunately, as hard as I try and change things around, I cannot get the OLED to display anything, including at startup, where it should display the Adafruit logo and the "Electrical loss" image when there is no info on speed brake position. Can anyone take a look at my code and see where I might have gotten things wrong? #define DCSBIOS_IRQ_SERIAL #include "DcsBios.h" #include <SPI.h> #include <Wire.h> // For OLED #include <Adafruit_GFX.h> // For OLED #include <Adafruit_SSD1306.h> // For OLED #define SCREEN_WIDTH 128 // OLED display width, in pixels #define SCREEN_HEIGHT 64 // OLED display height, in pixels #define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin) Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); // 'F-16_SpeedBrake Indicator_Closed', 128x64px const unsigned char myBitmap_Closed [] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xc1, 0x80, 0x0f, 0xc0, 0x3f, 0x0f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xe3, 0x80, 0x1f, 0xf0, 0x7f, 0x8f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xf3, 0x80, 0x3c, 0x78, 0xf3, 0xce, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x7b, 0x80, 0x70, 0x3c, 0xe1, 0xce, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x3b, 0x80, 0x70, 0x1c, 0xe1, 0xce, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x80, 0xe0, 0x1c, 0xf8, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x80, 0xe0, 0x1e, 0x7f, 0x0f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x80, 0xe0, 0x1e, 0x3f, 0x8f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x80, 0xe0, 0x1c, 0x07, 0xcf, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x13, 0x80, 0x60, 0x1c, 0x01, 0xee, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3b, 0x80, 0x70, 0x1d, 0xc0, 0xee, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x7b, 0x80, 0x78, 0x3d, 0xe1, 0xee, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf3, 0xfe, 0x3f, 0xf8, 0xff, 0xcf, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xe3, 0xff, 0x1f, 0xf0, 0x7f, 0x8f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xc1, 0xfe, 0x0f, 0xc0, 0x3f, 0x07, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; // 'F-16_SpeedBrake Indicator_Open', 128x64px const unsigned char myBitmap_Open [] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x03, 0xe0, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x07, 0xf0, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0x00, 0x1f, 0xf8, 0x00, 0x7f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0x00, 0x1f, 0xfc, 0x00, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0x80, 0x1f, 0xfc, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0x80, 0x1f, 0xfc, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0x00, 0x1f, 0xfc, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0x00, 0x1f, 0xfc, 0x00, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0x00, 0x0f, 0xf8, 0x00, 0x7f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x07, 0xf0, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x01, 0xc0, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x07, 0xf0, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0x00, 0x0f, 0xf8, 0x00, 0x7f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0x00, 0x1f, 0xfc, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0x80, 0x1f, 0xfc, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0x80, 0x1f, 0xfc, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0x80, 0x1f, 0xfc, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0x00, 0x1f, 0xfc, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0x00, 0x0f, 0xf8, 0x00, 0x7f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x07, 0xf0, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x01, 0xc0, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x03, 0xe0, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x03, 0xe0, 0x00, 0x1f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0x00, 0x0f, 0xf8, 0x00, 0x7f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0x00, 0x1f, 0xfc, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0x80, 0x1f, 0xfc, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0x80, 0x1f, 0xfc, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0x80, 0x1f, 0xfc, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0x00, 0x1f, 0xfc, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0x00, 0x0f, 0xf8, 0x00, 0x7f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x07, 0xf0, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; // 'F-16_SpeedBrake Indicator_ELEC loss', 128x64px const unsigned char myBitmap_Loss [] PROGMEM = { 0x00, 0x00, 0x00, 0x07, 0xe0, 0x7f, 0xf0, 0x3f, 0xf8, 0x1f, 0xfc, 0x0f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc0, 0xff, 0xe0, 0x7f, 0xf0, 0x3f, 0xf8, 0x1f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x81, 0xff, 0xc0, 0xff, 0xe0, 0x7f, 0xf0, 0x3f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x03, 0xff, 0x01, 0xff, 0xc0, 0xff, 0xe0, 0x7f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x07, 0xff, 0x03, 0xff, 0x81, 0xff, 0xc0, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0f, 0xfe, 0x07, 0xff, 0x03, 0xff, 0x81, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfc, 0x0f, 0xfe, 0x07, 0xff, 0x03, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xf8, 0x1f, 0xfc, 0x0f, 0xfe, 0x07, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xf0, 0x7f, 0xf8, 0x1f, 0xfc, 0x0f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xe0, 0xff, 0xf0, 0x3f, 0xf8, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0x81, 0xff, 0xc0, 0x7f, 0xf0, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0x01, 0xff, 0x81, 0xff, 0xe0, 0xff, 0xf0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xfe, 0x07, 0xff, 0x03, 0xff, 0xc1, 0xff, 0xc0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xfc, 0x0f, 0xfe, 0x07, 0xff, 0x03, 0xff, 0xc0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x1f, 0xfc, 0x07, 0xff, 0x03, 0xff, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf0, 0x3f, 0xf8, 0x1f, 0xfc, 0x0f, 0xfe, 0x07, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe0, 0x7f, 0xf0, 0x3f, 0xf8, 0x1f, 0xfc, 0x0f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc0, 0xff, 0xe0, 0x7f, 0xf0, 0x3f, 0xf8, 0x1f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x81, 0xff, 0xc0, 0xff, 0xe0, 0x7f, 0xf0, 0x3f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x03, 0xff, 0x03, 0xff, 0xc0, 0xff, 0xe0, 0x7f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0f, 0xff, 0x07, 0xff, 0x83, 0xff, 0xc1, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfc, 0x0f, 0xfe, 0x03, 0xff, 0x01, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf8, 0x1f, 0xfc, 0x0f, 0xfe, 0x07, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xf0, 0x3f, 0xf8, 0x1f, 0xfe, 0x0f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x7f, 0xf0, 0x3f, 0xf8, 0x1f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xc0, 0xff, 0xe0, 0x7f, 0xf0, 0x3f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0x81, 0xff, 0xc0, 0xff, 0xe0, 0x7f, 0xf0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0x03, 0xff, 0x81, 0xff, 0xc0, 0xff, 0xe0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xfe, 0x07, 0xff, 0x03, 0xff, 0x81, 0xff, 0xc0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xfc, 0x0f, 0xfe, 0x07, 0xff, 0x03, 0xff, 0x81, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x1f, 0xf8, 0x0f, 0xfe, 0x07, 0xff, 0x03, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe0, 0x3f, 0xf0, 0x1f, 0xfc, 0x0f, 0xfe, 0x07, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc0, 0x7f, 0xe0, 0x7f, 0xf8, 0x1f, 0xf8, 0x0f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x81, 0xff, 0xc0, 0xff, 0xf0, 0x3f, 0xf8, 0x1f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x03, 0xff, 0x81, 0xff, 0xc0, 0x7f, 0xe0, 0x3f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x07, 0xff, 0x03, 0xff, 0x80, 0xff, 0xe0, 0x7f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0f, 0xfe, 0x07, 0xff, 0x03, 0xff, 0x81, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfc, 0x0f, 0xfe, 0x07, 0xff, 0x03, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf8, 0x1f, 0xfc, 0x0f, 0xfe, 0x07, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xf0, 0x3f, 0xf8, 0x1f, 0xfc, 0x0f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x7f, 0xf0, 0x3f, 0xf8, 0x1f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xc1, 0xff, 0xe0, 0x7f, 0xf0, 0x3f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0x81, 0xff, 0xc0, 0xff, 0xe0, 0x7f, 0xf0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0x03, 0xff, 0x81, 0xff, 0xc0, 0xff, 0xe0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xfe, 0x07, 0xff, 0x03, 0xff, 0x81, 0xff, 0xc0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xfc, 0x0f, 0xfe, 0x07, 0xff, 0x03, 0xff, 0x81, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf0, 0x1f, 0xf8, 0x1f, 0xfe, 0x07, 0xff, 0x03, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe0, 0x7f, 0xf0, 0x3f, 0xfc, 0x0f, 0xfe, 0x07, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc0, 0xff, 0xe0, 0x7f, 0xf0, 0x1f, 0xf8, 0x1f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x81, 0xff, 0xc0, 0xff, 0xe0, 0x7f, 0xf0, 0x3f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x03, 0xff, 0x01, 0xff, 0xc0, 0xff, 0xe0, 0x7f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x07, 0xff, 0x03, 0xff, 0x81, 0xff, 0xc0, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xfe, 0x0f, 0xff, 0x03, 0xff, 0x81, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x0f, 0xfe, 0x07, 0xff, 0x03, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xf8, 0x3f, 0xfc, 0x0f, 0xfe, 0x07, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xf0, 0x7f, 0xf8, 0x1f, 0xfc, 0x0f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xc0, 0xff, 0xe0, 0x7f, 0xf8, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0x81, 0xff, 0xc0, 0xff, 0xf0, 0x7f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0x03, 0xff, 0x81, 0xff, 0xc0, 0xff, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xfe, 0x07, 0xff, 0x03, 0xff, 0x81, 0xff, 0xc0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xfc, 0x0f, 0xfe, 0x07, 0xff, 0x03, 0xff, 0x80, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x1f, 0xfc, 0x0f, 0xfe, 0x07, 0xff, 0x03, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf0, 0x3f, 0xf8, 0x1f, 0xfc, 0x07, 0xfe, 0x03, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe0, 0x7f, 0xf0, 0x3f, 0xf8, 0x1f, 0xfc, 0x0f, 0xe0, 0x00, 0x00, 0x00 }; void setup() { DcsBios::setup(); display.begin(SSD1306_SWITCHCAPVCC, 0x3c); // Address 0x3D or 0x3D for 128x64, need to try! display.display(); delay(4000); display.clearDisplay(); //for Clearing the display display.drawBitmap(0, 0, myBitmap_Loss, 128, 64, WHITE); // display.drawBitmap(x position, y position, bitmap data, bitmap width, bitmap height, color) display.display(); } void loop() { DcsBios::loop(); } /* ---------------- LANDING GEAR PANEL --------------------- */ /* F5 LEDs */ DcsBios::LED gwLight(0x760e, 0x0200, 13); DcsBios::LED noseLight(0x760e, 0x0400, 12); DcsBios::LED leftLight(0x760e, 0x0800, 11); DcsBios::LED rightLight(0x760e, 0x1000, 10); /* F86 LEDs */ DcsBios::LED lmpHydroNosegear(0x3044, 0x0004, 12); DcsBios::LED lmpHydroLeftgear(0x3044, 0x0001, 11); DcsBios::LED lmpHydroRightgear(0x3044, 0x0002, 10); /* F-16 LEDs */ DcsBios::LED lightGearWarn(0x4474, 0x1000, 13); DcsBios::LED lightGearN(0x4474, 0x0200, 12); DcsBios::LED lightGearL(0x4474, 0x0400, 11); DcsBios::LED lightGearR(0x4474, 0x0800, 10); void onSpeedbrakeIndicatorChange(unsigned int newValue) { /* if (newValue == 65535) { // For Speed Brake fully deployed digitalWrite(9,HIGH); // Set PIN 9 with LED ON } else { digitalWrite(9, LOW); } if (newValue > 0) { // For Speed Brake partially deployed digitalWrite(2,HIGH); // Set PIN 2 with LED ON } else { digitalWrite(2, LOW); }*/ if (newValue > 0) { // For Speed Brake deployed display.clearDisplay(); //for Clearing the display display.drawBitmap(0, 0, myBitmap_Loss, 128, 64, WHITE); // display.drawBitmap(x position, y position, bitmap data, bitmap width, bitmap height, color) display.display(); delay(500); display.clearDisplay(); //for Clearing the display, clears the buffer display.drawBitmap(0, 0, myBitmap_Open, 128, 64, WHITE); // display.drawBitmap(x position, y position, bitmap data, bitmap width, bitmap height, color) display.display(); } if (newValue = 0) { // For Speed Brake Closed display.clearDisplay(); //for Clearing the display display.drawBitmap(0, 0, myBitmap_Loss, 128, 64, WHITE); // display.drawBitmap(x position, y position, bitmap data, bitmap width, bitmap height, color) display.display(); delay(500); display.clearDisplay(); //for Clearing the display, clears the buffer display.drawBitmap(0, 0, myBitmap_Closed, 128, 64, WHITE); // display.drawBitmap(x position, y position, bitmap data, bitmap width, bitmap height, color) display.display(); } } DcsBios::IntegerBuffer speedbrakeIndicatorBuffer(0x44c6, 0xffff, 0, onSpeedbrakeIndicatorChange); /* F5 SWITCHES - 2 POSITIONS */ DcsBios::Switch2Pos lgLeverSwitch("LG_LEVER_SWITCH", A0); /* F86 SWITCHES - 2 POSITIONS */ DcsBios::Switch2Pos landingGearHandle("LANDING_GEAR_HANDLE", A0); DcsBios::Switch2Pos hook("HOOK", A1); DcsBios::Switch2Pos lgLight("LG_LIGHT", 3); DcsBios::Switch2Pos emerJettB("EMER_JETT_B", A3); /* F16 SWITCHES - 2 POSITIONS */ DcsBios::Switch2Pos gearHandle("GEAR_HANDLE", A0); DcsBios::Switch2Pos hookSw("HOOK_SW", A1); DcsBios::Switch2Pos storesConfigSw("STORES_CONFIG_SW", A2); DcsBios::Switch2Pos gndJettEnableSw("GND_JETT_ENABLE_SW", 7); DcsBios::Switch2Pos brakeChanSw("BRAKE_CHAN_SW", 8); /* F16 SWITCHES - 3 POSITIONS */ DcsBios::Switch3Pos landTaxiLightSw("LAND_TAXI_LIGHT_SW", 3, 4); DcsBios::Switch3Pos antiSkidSw("ANTI_SKID_SW", 5, 6); /* F16 PUSH BUTTONS */ DcsBios::Switch2Pos emergStroreJett("EMERG_STRORE_JETT", A3); DcsBios::Switch2Pos hornSilenceBtn("HORN_SILENCE_BTN", 2); // DcsBios::Switch2Pos dnLockBtn("DN_LOCK_BTN", PIN); // Not used at the time! /* ---------------- F16 HMCS PANEL --------------------- */ /* POTENTIOMETERS */ DcsBios::PotentiometerEWMA<5, 128, 5> hmcsIntKnb("HMCS_INT_KNB", A7); Thanks!!! GU
No1sonuk Posted November 14, 2020 Posted November 14, 2020 The first thing to try would be to move the #include "DcsBios.h" line to be the last of the includes - DCS-BIOS is a bit funny like that. I think there's stuff in there that's conditional on other functions being included, so it has to be last. Like this: #define DCSBIOS_IRQ_SERIAL #include <SPI.h> #include <Wire.h> // For OLED #include <Adafruit_GFX.h> // For OLED #include <Adafruit_SSD1306.h> // For OLED #define SCREEN_WIDTH 128 // OLED display width, in pixels #define SCREEN_HEIGHT 64 // OLED display height, in pixels #define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin) Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); #include "DcsBios.h" If that fails, start from scratch with just your display code. Get that to respond as it should, then add other bits. There's nothing more frustrating than having trouble with one part of the code only to discover it was something seemingly unrelated that was screwing it up! 2
GearUpper Posted November 15, 2020 Author Posted November 15, 2020 The first thing to try would be to move the #include "DcsBios.h" line to be the last of the includes - DCS-BIOS is a bit funny like that. I think there's stuff in there that's conditional on other functions being included, so it has to be last. Like this: #define DCSBIOS_IRQ_SERIAL #include #include // For OLED #include // For OLED #include // For OLED #define SCREEN_WIDTH 128 // OLED display width, in pixels #define SCREEN_HEIGHT 64 // OLED display height, in pixels #define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin) Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); #include "DcsBios.h" If that fails, start from scratch with just your display code. Get that to respond as it should, then add other bits. There's nothing more frustrating than having trouble with one part of the code only to discover it was something seemingly unrelated that was screwing it up!Thanks for the suggestion! I tried moving that #include as you suggested but it did not work... However as you reminded well, I redid the code section by section, and what I found out was that the Nano could not cope with all the DCS functions of the buttons, potentiometer, LEDs and the 3x bitmaps that I included for the OLED. So basically from the original code I removed some DCS BIOS functions (did not matter which!) until I saw that the OLED would initialize when first powered. Had to get rid of my F86 stuff which had lower priority... My IDE compilation feedback could not identify that the global variables would be overwhelming (my guess), as available space and memory was still around 40%. So next step, maybe dump the Bitmaps and manually draw the circles and lines and get some genuine text for the Close position. Let's see if the Arduino will do this quick enough. If there are any suggestions or feedback on what else could have happened here feel free to share :) Cheers!
gardnerjr Posted November 15, 2020 Posted November 15, 2020 does the display work if you leave all the code, but unplug all the other devices from the nano? it might be that you're simply drawing more power than the nano can provide, and you might need an additional 5v power source to power the display? 1
GearUpper Posted November 15, 2020 Author Posted November 15, 2020 does the display work if you leave all the code, but unplug all the other devices from the nano? it might be that you're simply drawing more power than the nano can provide, and you might need an additional 5v power source to power the display?Hi, in terms of power drain I only have the OLED (20mA), plus 5 LEDs. The rest are switches and 1x potentiometer. The DCS BIOS functions that I removed where only related to 2 and 3 position switches. I tried to remove different (switch) functions, the result was the same, consistently. I have been testing this Nano since and so far it has been working well!
crash test pilot Posted November 15, 2020 Posted November 15, 2020 I am very interested in your results because i want to use a similar OLED (128*32) for the fuel quantity counter and i cannot get dcs-bios to write anything to this display...
Fusedspine33 Posted November 16, 2020 Posted November 16, 2020 If you are having power issues you could try moving up to an Uno and attaching an external power supply. Sent from my iPad using Tapatalk
No1sonuk Posted November 16, 2020 Posted November 16, 2020 I think your problem is the throughput of the Nano, not it's power supply. Another member and I were having issues with the A10 altimeter glitching because one Arduino couldn't drive 2 I2C OLEDs to produce the altitude and barometric pressure numbers. The only solution I found that didn't glitch was to split the display drivers onto individual Nanos.
GearUpper Posted November 16, 2020 Author Posted November 16, 2020 I think your problem is the throughput of the Nano, not it's power supply. Another member and I were having issues with the A10 altimeter glitching because one Arduino couldn't drive 2 I2C OLEDs to produce the altitude and barometric pressure numbers. The only solution I found that didn't glitch was to split the display drivers onto individual Nanos.That is what I am leaning for. The OLED needs 1Kb of memory allocated to it as I remember well. If I crunch too many DCS BIOS functions into the code it just blocks the Nano, no OLED and no basic reading of switches. I am trying to get rid of the Bitmaps and just draw lines, circles and text using the Adafruit GFX, but that is not helping either. As you said, probably the Nano can only handle one I2C OLED and not that much more. Will do some final experiments and see what I can find out more.
No1sonuk Posted November 18, 2020 Posted November 18, 2020 I'm not referring to the amount of memory it has. I'm referring to the speed of the device. I think you'll find bitmaps are faster, and drawing the lines will slow it right down.
Recommended Posts