Need Help!

y do we start a coding with AFMS.begin() ???

What is AFDM? Ash Free Dry Mass according to Google, or Advanced Fluid Dynamics Model

Why not use a descriptive subject line so we can have a clue what you are asking about?

MarkT:
Why not use a descriptive subject line so we can have a clue what you are asking about?

Would that not require first reading the "How to Post" instructions?

AFMS.begin()

AFMS.begin(); // create with the default frequency 1.6KHz

//AFMS.begin(1000); // OR with a different frequency, say 1KHz

what is this code for ??

At first glance,,, I would guess,and this is just a guess, mind you, but, maybe,, it will instansiate a a process which should, some how, maybe generate a frequency output of whatever you specify in the function call (like "say 1KHz").....

AFMS = Adafruit_MotorShield()

in page 33

In your setup() function, call 'begin()" on the Adafruit_MotorShield object:

AFMS.begin();

Page 43

void begin(uint16_t freq = 1600);
begin() must be called in setup() to initialize the shield. An optional frequency parameter can be
used to specify something other than the default maximum: 1.6KHz PWM frequency.