Using PIR HC-SR501 to run LED Matrix HT16K33 code to diplay a number.

I have the number displayed on the HT16K33. I am unable to control the display based on the PIR’s state. Here is the code I am using. Thanks
#include <Wire.h>
#include <Adafruit_GFX.h>
#include “Adafruit_LEDBackpack.h”

Adafruit_8x8matrix matrix = Adafruit_8x8matrix();

int inputPin = 7;
int pirState = LOW;
int val = 0;

void setup() {
pinMode(inputPin, INPUT);
Serial.begin(9600);
Serial.println(“8x8 LED Matrix Test”);

matrix.begin(0x70); // pass in the address
}

static const uint8_t PROGMEM
nine_bmp =
{ B01111110,
B01000010,
B01000010,
B01111110,
B00000010,
B00000010,
B00000010,
B00000000};

void loop() {
val = digitalRead(inputPin); // read input value
if (val == HIGH) { // check if the input is HIGH
matrix.drawBitmap(0, 0, nine_bmp, 8, 8, LED_ON, HIGH); // turn LED ON
if (pirState == LOW) {
pirState = HIGH;
}
} else {
matrix.drawBitmap(0, 0, nine_bmp, 8, 8, LED_ON, LOW); // turn LED OFF
if (pirState == HIGH){
pirState = LOW;
}
}
}

For informed help, please read and follow the directions in the "How to use this forum" post.

Include a wiring diagram (not Fritzing).

wiring diagram attached

What part of "not Fritzing" do you not understand?

Please use code tags when posting code.

All of it apparently