Can anyone share their code for this, I've got Nano connected to a SH1106 my code below only to show the 10k portion to prove, but not getting the required display.
/*DCS BIOS FFI FOR VIPER*/
#define DCSBIOS_IRQ_SERIAL
#include "DcsBios.h"
#include <Arduino.h>
#include <U8g2lib.h>
#include <Wire.h>
U8G2_SH1106_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);
unsigned int flowtenk;
int tenko;
void onFuelflowcounter10kChange(unsigned int newValue) {
flowtenk = (newValue);
tenko = map(flowtenk, 0,65535,0,9);
}
DcsBios::IntegerBuffer fuelflowcounter10kBuffer(0x44d6, 0xffff, 0, onFuelflowcounter10kChange);
void setup(void) {
DcsBios::setup();
u8g2.begin();
u8g2.clearBuffer();
u8g2.setFont(u8g2_font_7x13_tf);
}
void loop(void) {
u8g2.clearBuffer();
u8g2.drawStr(35,10, "FUEL FLOW");
u8g2.drawStr(35,45, tenko);
u8g2.sendBuffer(); // Transfer to display
delay(1000);
}
```