Why pins don't output highs

Hi. New to Arduino and the intricacies of its programming. I'm building a circuit where I'm using a Nano to control a simple two motor robot. Two QRD1114 sensors and an L298 motor driver are the inputs and output respectively. I've written the following program (I will replace the dreaded delays later). When I check for outputs, the pins I am using for the enables, 8 and 9, will not go high. I'm using a multimeter to check for a high signal but they both remain low. Also, the sensors do not change the motor output states from what was designated in the forward function. The sensor circuit returns low inputs to the Nano when they are activated (verified as working). This reverses motor direction through two functions, one for each sensor. I've moved the enables to within the void loop() and also the forward function with no change in result.
I have tried both digitalWrite and analogWrite (my preference for motor speed control).
I've looked at a ton of examples and cannot see what I am doing wrong. My gut says I am declaring/assigning the pins wrong somehow.
Any input is appreciated.

int enA=8; // assign pin 8 as enable a
int enB=9; // assign pin 9 as enable b
int m1aPin=7; // assign one connection of motor 1 to pin 7
int m1bPin=10; // assign one connection of motor 1 to pin 10
int m2aPin=11; // assign one connection of motor 2 to pin 11
int m2bPin=15; // assign one connection of motor 2 to pin 15
int senaPin=6; // assign sensor a digital input to pin 6
int senbPin=5; // assign sensor b digital input to pin 5

void setup() {
  // Setup code to run once:
  // Enable pins are set as outputs and used to turn motors on:
 pinMode(enA, OUTPUT); //declare enaPin as an OUTPUT
 pinMode(enB, OUTPUT); //declare enbPin as an OUTPUT
// Designate motor control pins as outputs:
 pinMode(m1aPin, OUTPUT); //declare enaPin as an OUTPUT
 pinMode(m1bPin, OUTPUT); //declare enbPin as an OUTPUT
 pinMode(m2aPin, OUTPUT); //declare enaPin as an OUTPUT
 pinMode(m2bPin, OUTPUT); //declare enbPin as an OUTPUT
// Designate sensor pins as inputs:
 pinMode(senaPin, INPUT); //declare enaPin as an INPUT
 pinMode(senbPin, INPUT); //declare enbPin as an INPUT
 // set the enable pins high to wake up the L298 motor driver 
  //These are used with PWM to control motor speed
 analogWrite(enA,200); //set enA on full speed to start
 analogWrite(enB, 200); //set enB on full speed to start
 
 // Start motors going forward
  Forward();
}

void loop() 
{  
  
  //Check to see if the sensors are detecting the edge of the ring
 if (senaPin==LOW) {RevLeft();}
 if (senbPin==LOW) {RevRight();}
}

void Forward()
{
   // Function to turn the motors on to go forward 
 digitalWrite(m1aPin, HIGH); //set m1a HIGH to start
 digitalWrite(m1bPin, LOW); //set m1b LOW to start
 digitalWrite(m2aPin, HIGH); //set m2a HIGH to start
 digitalWrite(m2bPin, LOW); //set m2b LOW to start
}

void RevLeft()
{
  // Reverse motors, turn left, then go forward again
digitalWrite(m1aPin, LOW); //set m1a HIGH to reverse
digitalWrite(m1bPin, HIGH); //set m1b LOW to reverse
digitalWrite(m2aPin, HIGH); //set m2a HIGH to reverse
digitalWrite(m2bPin, LOW); //set m2b LOW to reverse
delay (1000); // reverse for 1 second
  // turn
digitalWrite(m2aPin, HIGH); //set m2a HIGH to turn
digitalWrite(m2bPin, LOW); //set m2b LOW to turn
delay (1000); // turn for 1 second
  // go forward:
digitalWrite(m1aPin, HIGH); //set m1a HIGH to go forward
digitalWrite(m1bPin, LOW); //set m1b LOW to go forward
}

void RevRight()
{
  // Reverse motors, turn right, then go forward again
  digitalWrite(m1aPin, LOW); //set m1a HIGH to reverse
digitalWrite(m1bPin, HIGH); //set m1b LOW to reverse
digitalWrite(m2aPin, HIGH); //set m2a HIGH to reverse
digitalWrite(m2bPin, LOW); //set m2b LOW to reverse
delay (1000); // reverse for 1 second
 // turn
digitalWrite(m1aPin, HIGH); //set m1a HIGH to turn
digitalWrite(m1bPin, LOW); //set m1b LOW to turn 
delay (1000); // turn for 1 second
// go forward:
digitalWrite(m2aPin, HIGH); //set m2a HIGH to go forward
digitalWrite(m2bPin, LOW); //set m2b LOW to go forward
}

[quote\ analogWrite(enA,200); //set enA on full speed to start
analogWrite(enB, 200); //set enB on full speed to start[/quote]
If these are the enable pins, why the analogWrite? Also, pin 8 is not PWM so analogWrite would have no effect. I believe you want to change thaqt to digitalWrite(enA, HIGH), digitalWrite(enB, HIGH) to see 5V at the output.

If these are the enable pins, why the analogWrite?

It's pretty common for an H-bridge motor driver to be driven with a PWM signal on its enable pins, and steady state om the pins that set the "direction" of the Hbridge. So that makes sense...

pin 8 is not PWM so analogWrite would have no effect.

That's more of a problem. Although for non-PWM pins, analogWrite() with values greater than 127 should result in a HIGH and lower than 128 should result in a LOW output.

Are you sure you're looking at the right Pin8 and Pin9? Those the pins labeled D8 and D9, which are NOT the same as pin 8 and pin 9 of the DIP. I can't tell from the picture, but it looks like D8 and D9 might not be connected to anything...

Nano, DIP?

Thanks for the replies.
I'm using the actual DIP pin counts for all of the pin numbers. Should I be using the "D" numbers and not the DIP numbers as one counts when numbering pins on any IC? The old microcontroller I used to use one used the actual pin number and not the designated name. When referencing the actual pin counts, pincount 8 and 9 are both listed as PWM (ie D05 & D06). Could this be my issue? What puzzles me is that using the DIP pin numbers the motor outputs for the forward function are returning the proper highs/lows. Just coincidence perhaps? So it may be I just have to change the pin numbers used to the "D" numbers?
It is a NANO DIP package with bottom mounted headers to plug into the board.

EmbedEd:
Should I be using the "D" numbers and not the DIP numbers as one counts when numbering pins on any IC?

Yes.

Thanks for replying All
I was indeed designating the pins wrong in the program.:grinning:
Now just to tweek...