Nano BLE Connecting DC Motor with L293D Board Bug

I recently got the Nano BLE and very much am a beginner at all these things.

I was trying to run a DC motor with the Nano, using the L293D arduino shield as well. This L293D shield is most commonly used for Arduino Uno, but figured if I looked at the pin layouts of the Uno and the Nano and wire appropriately it would be fine. (Refer to the images below for the pin layout diagrams referenced)

I connected one DC motor to just test it out, and used to the code:

#include <AFMotor.h> 

AF_DCMotor motor(1, MOTOR12_64KHZ)

void setup(){
motor.setSpeed(200);
}

void loop() { 
motor.run(FORWARD);       
delay(1000); 
motor.run(BACKWARD);      
delay(1000);  
motor.run(RELEASE);       
delay(1000); 
}

I apologize if the code was copied wrong, but the original website I was referring to can be found here. This is from an Arduino Project hub so I thought it was pretty reliable.

But the error is that when I was trying to compile, I kept getting an error: "motor12_64hz was not declared in this scope." for the line "AF_DCMotor motor(1, MOTOR12_64KHZ)."

I tried to use the built in example code linked with the library, and even that code did not compile correctly.

So I was wondering if anyone knew why this bug is popping up, I've been trying to search around, and couldn't find anything that could fix this bug.

Thanks so much!

Possible root causes:

  1. Incomplete library
  2. Incompatible library
  3. Later on: Incompatible logic level (UNO=5V, Nano BLe = 3.3V
  4. everything else

For 1 & 2 you have to analyze the library for potential omissions, #ifdef statement etc.

Thanks for the reply.

I was actually looking into the library and was a bit confused on how to make sure the the argument is allowed. Are there any tips for this?

In addition, I find it odd that the library was referred on the example code, but isn't working or compatible with my code. Is it likely that this can happen and if so, what are the main reasons?