For this adafruit debounce push button code, where do I put my loop to be executed?

Thanks again good sir. I ended up going back to an older debounce method to try your if statements out. I'm working with this now

#include "FastLED.h"

#define DATA_PIN 13 
#define NUM_LEDS 128 

CRGB leds[NUM_LEDS];

byte ledArray1[] = {0, 8, 16, 24, 64, 72, 80, 88};
byte ledArray2[] = {1, 9, 17, 25, 65, 73, 81, 89};
byte ledArray3[] = {2, 10, 18, 26, 66, 74, 82, 90};
byte ledArray4[] = {3, 11, 19, 27, 67, 75, 83, 91};
int count = 0;

int ledState2 = LOW;
int buttonState2;
int lastbuttonState2 = LOW;
const byte buttonpin2 = 2;

int ledState3 = LOW;
int buttonState3;
int lastbuttonState3 = LOW;
const byte buttonpin3 = 3;

unsigned long lastDebounceTime2 = 0;
unsigned long lastDebounceTime3 = 0;

const unsigned long debounceDelay = 50;

void setup() 
{
  FastLED.addLeds<WS2812, DATA_PIN, GRB>(leds, NUM_LEDS);
  FastLED.setBrightness(100);
  pinMode(buttonpin2, INPUT);
  pinMode(buttonpin3, INPUT);
}
void loop() 
{
//READ BUTTON 2
int reading2 = digitalRead(buttonpin2);
if (reading2 != lastbuttonState2) 
 {
 lastDebounceTime2 = millis();
 }
if ((millis() - lastDebounceTime2) > debounceDelay) 
 {
 if (reading2 != buttonState2) 
  {
  buttonState2 = reading2;
  if (buttonState2 == HIGH) 
   {
   ledState2 = !ledState2;
   }
  }
 }
lastbuttonState2 = reading2;
if (ledState2 == HIGH)
 {
 flashbluesquare();
 }
 else
 {
 flashredtriangle();
 }

int reading3 = digitalRead(buttonpin3);
if (reading3 != lastbuttonState3) 
 {
 lastDebounceTime3 = millis();
 }
if ((millis() - lastDebounceTime3) > debounceDelay) 
 {
 if (reading3 != buttonState3) 
  {
  buttonState3 = reading3;
  if (buttonState3 == HIGH) 
   {
   ledState3 = !ledState3;
   }
  }
 }
lastbuttonState3 = reading3;
if (ledState3 == HIGH)
 {
 flashyellowrhombus();
 }
 else
 {
 flashgreendiamond();
 }
}

My only problem is that the button checking is reading both buttonstates for "Low" or "High" every time.

If I may ask, do you have any idea how I can stop the loop from reading the state of the first button (Button2) and read the second button (Button3) instead, leading it to display either the GreenDiamond loop or the YellowRhombus loop? Is there some sort of third option other than "LOW" or "HIGH" that I can set button2's checker to while 3 is set high?

It's probaby something so simple, but I'm unable to see it

/r/arduino Thread Parent