Help ,Please,afr gauge Newbie to Arduino

Can anyone help with this oled afr gauge code I’m working on, admittedly it not my coding but I cant get any response from the original author. I have altered the initial stat-up screen for my needs , compiles ok an uploads , Bar graph works as it should displaying the output reading but the numerical display above the graph stays at 00.0 reading I have been searching for the answer but I’m at a loss, any help would be grateful
using Original Nano or uno (compiled for both)
124x64 oled pins gnd.vcc.scl.sda
potentiometer to reproduce 0-5v input`


#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels

  // Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
#define OLED_RESET 4
  Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

  int XPOS = 0;
  int YPOS = 0;
  int analogIn = A0;
  int val = 0;
  int value = 0;
  int x1 = 0;
  int x2 = 0;
  int x3 = 0;
  int needle = 0;

#define Gsxr_Logo_HEIGHT 64
#define Gsxr_Logo_WIDTH 128
  static const unsigned char PROGMEM Gsxr_Logo [] = {
    // 'GSX LOGO ', 128x64px
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x01, 0xfd, 0x6f, 0xa8, 0x00, 0x07, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfc, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xfc, 0x00, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xf8, 0x0f, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xcf, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0x87, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xfe, 0x01, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xfc, 0x00, 0x7f, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xf8, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x07, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00,
    0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00,
    0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
    0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00,
    0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xf8, 0x00,
    0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xfe, 0x00,
    0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 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, 0x03, 0xff, 0xff, 0xff, 0x81, 0xff, 0xff, 0xff, 0x02, 0xaf, 0x80, 0x01, 0xe0, 0x00,
    0x00, 0x00, 0x0f, 0xff, 0xef, 0xbb, 0x87, 0xff, 0xb5, 0xff, 0x03, 0xff, 0xc0, 0x0f, 0xc0, 0x00,
    0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x01, 0xff, 0xf0, 0x7f, 0x00, 0x00,
    0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x00, 0x00,
    0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xfc, 0x00, 0x3f, 0xff, 0x80, 0x00, 0x00,
    0x00, 0x00, 0xff, 0xe1, 0xff, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x1f, 0xff, 0x00, 0x00, 0x00,
    0x00, 0x01, 0xff, 0xe0, 0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x1f, 0xff, 0x80, 0x00, 0x00,
    0x00, 0x01, 0xff, 0xc0, 0x1f, 0xfc, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x7f, 0xff, 0xc0, 0x00, 0x00,
    0x00, 0x03, 0xff, 0xc0, 0x3f, 0xfc, 0x00, 0x00, 0x3f, 0xf8, 0x03, 0xe1, 0xff, 0xe0, 0x00, 0x00,
    0x00, 0x03, 0xff, 0xc0, 0x7f, 0xfe, 0x8a, 0xd2, 0xff, 0xf8, 0x1f, 0x00, 0xff, 0xf0, 0x00, 0x00,
    0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x7f, 0xf8, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
  };

#define   Turbo_Logo_HEIGHT 64
#define Turbo_Logo_WIDTH 64
  static const unsigned char PROGMEM Turbo_Logo [ ] = {
    // 'turbo-got-boost-iphone-6-case5', 64x64px
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xf8,
    0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xf9, 0xfc, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xfd, 0xfc,
    0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xfe, 0xfe, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xfe, 0xfe,
    0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xfe, 0xfe,
    0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfe,
    0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0x00, 0x03, 0xff, 0x3f, 0xff, 0xff, 0xfe, 0xfe,
    0x00, 0x03, 0xfd, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0x00, 0x07, 0xfd, 0xff, 0xff, 0xff, 0xfe, 0xfe,
    0x00, 0x0f, 0xf6, 0xff, 0xff, 0xff, 0xfd, 0xfc, 0x00, 0x1f, 0xe3, 0xff, 0x03, 0x83, 0xfd, 0xfc,
    0x00, 0x1f, 0xfb, 0xf8, 0x7f, 0xfe, 0x13, 0xf8, 0x00, 0x3f, 0xaf, 0xf3, 0xe0, 0x1e, 0x0e, 0x00,
    0x00, 0x3f, 0xbf, 0xc7, 0x80, 0x07, 0x00, 0x00, 0x00, 0x7f, 0xdf, 0x9e, 0x00, 0x01, 0x80, 0x00,
    0x00, 0x7f, 0xff, 0x3c, 0x00, 0x00, 0x80, 0x00, 0x00, 0xff, 0xfe, 0x78, 0x00, 0x00, 0x40, 0x00,
    0x00, 0xff, 0xbe, 0xf0, 0x00, 0x00, 0x20, 0x00, 0x01, 0x7c, 0x7c, 0xf0, 0xfc, 0x00, 0x20, 0x00,
    0x03, 0xfc, 0xfd, 0xe6, 0xf3, 0x00, 0x10, 0x00, 0x03, 0xff, 0xf9, 0xee, 0xf1, 0x80, 0x10, 0x00,
    0x02, 0xff, 0xfb, 0xce, 0x73, 0x80, 0x08, 0x00, 0x06, 0xfb, 0xfb, 0xdf, 0x77, 0xc0, 0x08, 0x00,
    0x06, 0xfb, 0xfb, 0xdf, 0x76, 0xc0, 0x08, 0x00, 0x06, 0xfd, 0xfb, 0xdf, 0xac, 0x40, 0x08, 0x00,
    0x06, 0xfa, 0xf3, 0xc1, 0x58, 0x60, 0x08, 0x00, 0x06, 0xfa, 0xf7, 0xc3, 0x58, 0x60, 0x0c, 0x00,
    0x06, 0xff, 0xf3, 0xc7, 0x7c, 0x20, 0x0c, 0x00, 0x06, 0xfe, 0xfb, 0xdf, 0xbf, 0xc0, 0x0c, 0x00,
    0x06, 0xfb, 0x7b, 0xde, 0xe7, 0xc0, 0x08, 0x00, 0x06, 0xfc, 0xfb, 0xdc, 0xe3, 0xc0, 0x08, 0x00,
    0x0e, 0xff, 0xfb, 0xc8, 0xe1, 0x80, 0x18, 0x00, 0x0f, 0x7f, 0xfd, 0xe0, 0xf3, 0x00, 0x18, 0x00,
    0x0f, 0x7f, 0xfd, 0xe0, 0xf2, 0x00, 0x10, 0x00, 0x0f, 0x7f, 0xfe, 0xf0, 0xfc, 0x00, 0x30, 0x00,
    0x0f, 0xbf, 0xfe, 0xf8, 0x00, 0x00, 0x70, 0x00, 0x0f, 0xbf, 0xff, 0x78, 0x00, 0x00, 0xf0, 0x00,
    0x0f, 0xbf, 0xff, 0xbe, 0x00, 0x01, 0xe0, 0x00, 0x0f, 0xdf, 0xff, 0xcf, 0x00, 0x03, 0xe0, 0x00,
    0x1f, 0xef, 0xff, 0xe7, 0xc0, 0x0f, 0xc0, 0x00, 0x1f, 0xef, 0xff, 0xf9, 0xf8, 0x7f, 0xc0, 0x00,
    0x1f, 0xf7, 0xff, 0xff, 0x3f, 0xff, 0x80, 0x00, 0x1f, 0xfb, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
    0x1f, 0xfd, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x3f, 0xfe, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00,
    0x7f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x1f, 0xff, 0x3f, 0xff, 0xff, 0xf0, 0x00, 0x00,
    0x0e, 0x00, 0x1f, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xff, 0xff, 0x80, 0x00, 0x00,
    0x08, 0x1c, 0x00, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x1f, 0xc0, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
  };


#if (SSD1306_LCDHEIGHT != 64)
#error("Height incorrect, please fix Adafruit_SSD1306.h!");
#endif

  void setup()   {
    Serial.begin(9600);
    analogRead (A0);
    // by default, we'll generate the high voltage from the 3.3v line internally! (neat!)
    if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { // initialize with the I2C addr 0x3D (for the 128x64)
      Serial.println(F("SSD1306 allocation failed"));
      for (;;); // Don't proceed, loop forever
    }
    //init done
    display.clearDisplay();
    display.display();
    //initbuffer
    startDisplay();
  }


  void loop()
  {


    val = analogRead(analogIn);//A0
    needle = val;
    val = map(val, 0, 1023, 74, 221);
    needle = map(needle, 0, 1023, 1, 127);
    display.clearDisplay();
    display.drawRect(0, 52, 128, 12, WHITE);
    drawAFR();
    devide();
    display.setTextSize(4);
    display.setTextColor(WHITE);
    display.setCursor(22, 0);
    display.print(x1);
    display.print(x2);
    display.print(".");
    display.print(x3);
    display.drawLine(needle, 53, needle, 63, WHITE);
    display.drawLine(needle - 1, 53, needle - 1, 63, WHITE);
    display.drawLine(needle + 1, 53, needle + 1, 63, WHITE);
    display.display();

  }

  void startDisplay()
  {
    display.clearDisplay();
    display.drawBitmap(0, 0, Gsxr_Logo, 128, 64, 1);
    display.display();
    delay(3000);
    XPOS = 33;
    YPOS = -20;
    while (YPOS != 0) {
      display.clearDisplay();
      display.drawBitmap(XPOS, YPOS, Turbo_Logo, 64, 64, 1);
      display.display();
      YPOS ++;
    }

    for (int x = 0; x < 5; x++) {
      display.invertDisplay(true);
      delay(150);
      display.invertDisplay(false);
      delay(150);
    }
    display.invertDisplay(true);
    delay(3000);
    display.clearDisplay();
    display.display();
    display.invertDisplay(false);
  }

  void drawAFR()
  {
    display.drawLine(0, 47, 0, 51, WHITE);
    display.drawLine(64, 47, 64, 56, WHITE);
    display.drawLine(127, 47, 127, 51, WHITE);
    display.setTextSize(1);
    display.setTextColor(WHITE);
    display.setCursor(54, 34);
    display.println("14.7");
    display.setCursor(0, 34);
    display.println("7.4");
    display.setCursor(104, 34);
    display.println("22.1");

  }

  void devide()
  {
    analogRead(analogIn);//A0
    x1 = 0;
    x2 = 0;
    x3 = 0;
    value = val;
    if (value < 100) goto dozens;
    if (value < 10) goto units;
hundreds:
    value = value - 100;
    x1 = x1 ++;
    if (value < 100) goto dozens;
    goto hundreds;
dozens:
    if (value < 10) goto units;
    value = value - 10;
    x2 = x2 ++;
    if (value < 10) goto units;
    goto dozens;
units:
    if (value < 1) goto devide_end;
    value = value - 1;
    x3 = x3 ++;
    if (value < 0) goto devide_end;
    goto units;
devide_end:
    x1 = x1;

Please edit your post, select all code and click image ; next save your post. That way we don’t have look at things like square blocks in your code.

thank you for reply, will edit post

It’s still a mess as there are two codes inside each other. But OK

Not soving your problem but things like x1 = x1 ++; are not advisable; just x1++; should do the trick.

There is hardly ever a use for goto; and this code is definitely not one where goto is needed.

To calculate hundreds, you can simply divide by 100

x1 = value / 100;

Next you can subtract x * 100 from value and repeat the process for the dozens; x2 = value / 10;

Many thanks, I’m only just learning how to use Arduino an being 52 its actually not easy, I’m a mechanic not a programmer haha

Well ,Im so impressed with your help. used your theory and its working absolutely spot on.
thank you so much!!!

Sometimes I wished I was a mechanic :wink: At least I would have been able to get the battery out if my motorbike :frowning:

That statement conveys no useful information. In what way do the digits not work?

Please read the forum guidelines.
You did not post the code properly.
You failed to tell us what Arduino you are using.
You failed to tell us about your hardware and how it is wired.
You failed to provide a link to the original article that you mentioned.

Did you put in this line?

Nope, never mind. This display has that method.

I -think- that in

void drawAFR()

the last line should be…

display.display();

-jim lee

@ozz5269, please do not cross-post. Other thread removed.

Oh dear :slightly_frowning_face: , but then some are a bit tricky to get out, mines seat off , some I’ve worked on is fuel tank off plus side panel, so I wouldn’t be to worried you had trouble lol

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.