Adding OneButton library to my project (pt.I)

I got the OneButton library working with 3 buttons with the "click" and "press" functions with great help from the forum. I have tried to apply what I have learned about the function of the OneButton library into my on going project but I just don't know where to put it or how to add the functions that I want. I have 3 buttons //Abttn,Bbttn,Cbttn//that I want to either read values from arrays//Amem,Bmem,Cmem// on a click or write new values to the same arrays on a press. I have the code working except for the dual functions of the 3 buttons. (there is some lcd formatting that is wrong because I need a 2X20 instead of a 2X16)

#include <LiquidCrystal.h>//Get the LCD library

LiquidCrystal lcd( 8, 9, 4, 5, 6, 7 );//Assign the LCD pins

//Assign the input buttons
int upbttnF = 15;
int dwnbttnF = 16;
int upbttnR = 17;
int dwnbttnR = 18;
int Abttn = 11;
int Bbttn = 12;
int Cbttn = 13;

//initalize button states
int upbttnFState = 0;
int dwnbttnFState = 0;
int upbttnRState = 0;
int dwnbttnRState = 0;
int AbttnState = 0;
int BbttnState = 0;
int CbttnState = 0;
int bttnct = 0;

//initalize step counter varibles
int countF = 1;
int countR = 1;
int countFnew = 1;
int countRnew = 1;

//initalize memory value varible arrays
int myAVals[3] = {1,1};
int myBVals[3] = {14,14};
int myCVals[3] = {28,28};

//values for button cases, these are constants
#define nobutton 0
#define upbttn_F 1
#define dwnbttn_F 2
#define upbttn_R 3
#define dwnbttn_R 4
#define Amem 5
#define Bmem 6
#define Cmem 7

//Variables
byte buttonJustPressed = false;
byte buttonJustReleased = false;
byte  buttonWas =nobutton;

void setup()
{//start setup function
  //Assign buttons to inputs
  Serial.begin(9600);
  pinMode(upbttnF,INPUT); 
  pinMode(dwnbttnF,INPUT); 
  pinMode(upbttnR,INPUT); 
  pinMode(dwnbttnR,INPUT); 
  pinMode(Abttn,INPUT); 
  pinMode(Bbttn,INPUT); 
  pinMode(Cbttn,INPUT); 
  
  // Set up the LCD screen
//code omitted for post
 
void loop()
{//start void function
//Check button status
Serial.println("start void loop");
byte button;
button=ReadButtons();//run the ReadButtons function
if (buttonJustPressed || buttonJustReleased)
Serial.println(button);
//Change the value of the position counters
switch (button)
{ //start switch function
  case nobutton:
  {
    break;
  }
  case upbttn_F:
  {
    Serial.println("up button F pushed");
    countF = countF+1;
    countF = constrain (countF,1,28);
    lcd.setCursor(6,0);
    lcd.print("  ");//clears previous data for justification
    lcd.setCursor(6,0);
    lcd.print (countF);//prints new value of countF
    break;
  }
  case dwnbttn_F:
  {
    countF = countF-1;
    countF = constrain (countF,1,28);
    Serial.print("down button F pushed");
    lcd.setCursor(6,0);
    lcd.print("  ");
    lcd.setCursor(6,0);
    lcd.print(countF);
    break;
  }
  case upbttn_R:
  {
    countR = countR+1;
    countR = constrain (countR,1,28);
    Serial.println("up button R pushed");
    lcd.setCursor(14,0);
    lcd.print("  ");
    lcd.setCursor(14,0);
    lcd.print(countR);
    break;
  }
  case dwnbttn_R:
  {
    countR = countR-1;
    countR = constrain (countR,1,28);
    Serial.print("down button R pushed");
    lcd.setCursor(14,0);
    lcd.print("  ");
    lcd.setCursor(14,0);
    lcd.print(countR);
    break;
  }
  case Amem:
  {
    myAVals [0] = countF;
    myAVals [1] = countR;
    Serial.println("Memory A pressed");
    lcd.setCursor(1,1);
    lcd.print("  ");
    if (countF >9)
    lcd.setCursor(1,1);
    else
    lcd.setCursor(2,1);
    lcd.print(countF);
    lcd.setCursor(4,1);
    lcd.print("  ");
    lcd.setCursor(4,1);
    lcd.print(countR);
    break;
  }
  case Bmem:
  {
    myBVals [0] = countF;
    myBVals [1] = countR;
    Serial.println("Memory B pressed");
    lcd.setCursor(7,1);
    lcd.print("  ");
    if (countF>9)
    lcd.setCursor(7,1);
    else
    lcd.setCursor(8,1);
    lcd.print(countF);
    lcd.setCursor(10,1);
    lcd.print("  ");
    lcd.setCursor(10,1);
    lcd.print(countR);
    break;
  }
  case Cmem:
  {
    myCVals [0] = countF;
    myCVals [1] = countR;
    Serial.println("Memory C pressed");
    lcd.setCursor(13,1);
    lcd.print("  ");
    if (countF>9)
    lcd.setCursor(13,1);
    else
    lcd.setCursor(14,1);
    lcd.print(countF);
    lcd.setCursor(14,1);
    lcd.print("  ");
    lcd.setCursor(14,1);
    lcd.print(countR);
    break;
  }
    default:
    {
      break;
    }
}//end switch function
  if(buttonJustPressed)
  buttonJustPressed=false;
  if(buttonJustReleased)
  buttonJustReleased=false;
Serial.println("end void loop");
}//end of void loop

  byte ReadButtons()
  {//start ReadButtons function
  Serial.println("Start ReadButtons");
   byte button = nobutton;// assigns button value to 0 
  upbttnFState = digitalRead(upbttnF);
  delay (50);
  if (upbttnFState == HIGH)
  {
  button = upbttn_F;
  }
  dwnbttnFState = digitalRead(dwnbttnF);
  delay (50);
  if (dwnbttnFState == HIGH)
  {
  button = dwnbttn_F;
  }
  upbttnRState = digitalRead(upbttnR);
  delay (50);
  if (upbttnRState == HIGH)
  {
  button = upbttn_R;
  }
  dwnbttnRState = digitalRead(dwnbttnR);
  delay (50);
  if (dwnbttnRState == HIGH)
  {
  button = dwnbttn_R;
  }
  AbttnState = digitalRead(Abttn);
  delay (50);
  if (AbttnState == HIGH)
  {
  button = Amem;
  }
  BbttnState = digitalRead(Bbttn);
  delay (50);
  if (BbttnState == HIGH)
  {
  button = Bmem;
  }
  CbttnState = digitalRead(Cbttn);
  delay (50);
  if (CbttnState == HIGH)
  {
  button = Cmem;
  }
  if((buttonWas==nobutton)&&(button!=nobutton))
  {
    buttonJustPressed=true;
    buttonJustReleased=false;
  }
  if((buttonWas!=nobutton)&&(button==nobutton))
  {
  buttonJustPressed=false;
  buttonJustReleased=true;
  }
  buttonWas = button;
  Serial.println("Button value from ReadButtons");
  Serial.println(button);
  return(button);
}//end ReadButtons function

part II to follow

I have the following code that compiles and works.

#include "OneButton.h"

// Setup a new OneButtons on pin A1, A2 and A3.  
OneButton Abttn(A1, false);
OneButton Bbttn(A2, false);
OneButton Cbttn(A3, false);

// setup code here, to run once:
void setup() {
  // enable the standard led on pin 13.
  pinMode(13, OUTPUT); // sets the digital pin as output
  pinMode(12, OUTPUT);// sets digital pin as output
  pinMode(11, OUTPUT);
  
  //link the click function to be called on a click event.
  Abttn.attachClick(clickA);
  Bbttn.attachClick(clickB);
  Cbttn.attachClick(clickC);
  
  // link the doubleclick function to be called on a doubleclick event.   
  Abttn.attachDoubleClick(doubleclickA);
  Cbttn.attachDoubleClick(doubleclickB);
  Cbttn.attachDoubleClick(doubleclickC);
  
  //link the hold function to be called on a long hold event.
  Abttn.attachPress(pressA);
  Bbttn.attachPress(pressB);
  Cbttn.attachPress(pressC);
  Serial.begin (9600);
} // setup
  
// main code here, to run repeatedly: 
void loop() {
  // keep watching the push buttonA:
  Abttn.tick();
  Bbttn.tick();
  Cbttn.tick();

  // You can implement other code in here or just wait a while 
  delay(10);
} // loop

void clickA(){
  Serial.println("CLICK A");
  static int m = LOW;//reverse the led
  m = !m;
  digitalWrite(11,m);
}//click
void clickB(){
  Serial.println("CLICK B");
  static int m = LOW;//reverse the led
  m = !m;
  digitalWrite(11,m);
}//click
void clickC(){
  Serial.println("CLICK C");
  static int m = LOW;//reverse the led
  m = !m;
  digitalWrite(11,m);
}//click

// this function will be called when the buttonA was pressed 2 times in a short timeframe.
void doubleclickA() {
  Serial.println("DOUBLECLICK A");
  static int m = LOW;
  // reverse the LED 
  m = !m;
  digitalWrite(13, m);
} // doubleclick
void doubleclickB() {
  Serial.println("DOUBLECLICK B");
  static int m = LOW;
  // reverse the LED 
  m = !m;
  digitalWrite(13, m);
} // doubleclick
void doubleclickC() {
  Serial.println("DOUBLECLICK C");
  static int m = LOW;
  // reverse the LED 
  m = !m;
  digitalWrite(13, m);
} // doubleclick

void pressA(){
  Serial.println("PRESS A");
  static int m = LOW;
  m = !m;
  digitalWrite(12,m);
}//press
void pressB(){
  Serial.println("PRESS B");
  static int m = LOW;
  m = !m;
  digitalWrite(12,m);
}//press
void pressC(){
  Serial.println("PRESS C");
  static int m = LOW;
  m = !m;
  digitalWrite(12,m);
}//press

I just do not understand where to put the OneButton operations. It would seem that it should go into the ReadButtons() function and add cases to the switch function in the void loop but I just can't get it to compile. I have tried to put it into the void loop with equally miserable results.
I am really over my head with this project as it is my first attempt using an Arduino and C++. Apologies for the amount of code posted but I could not figure out how to reduce it and make my point clear. Any advice to get me in the right direction would be appreciated.

Thanks in advance
Dave E

Just stick to the one thread please. It's really confusing when you ask a question in one thread and follow it up in another.