Stepper Motor Functions

Hello,

Is it okay to define the RPMs and initiate the serial port in the function blocks? Or is this something that could be done elsewhere?

I would like the functions to have two separate RPMs, which is why I have it like it is now.

Thanks

This is your image

Do you really think an image is the best way to share text?
In general Things that need to happen only once and for the lifetime of the program are more suited in the setup() function
(Part of me wonder though where the F*#@! did you get this idea to initialize Serial there ? What does it have to do with driving forward or not ?? have you ever seen an example written that way?)

There are locked topics at the top of the forum that describe the correct way to post. A photograph of code is not listed there.

Besides, my mobile device and perhaps the devices of many others cannot open that picture. I can see properly posted code.

In general, it is correct to do what you asked in functions.

Smagby:
I would like the functions to have two separate RPMs, which is why I have it like it is now.

You need to post your program.

In the meantime these links may help
Serial Input Basics - simple reliable ways to receive data.

Stepper Motor Basics
Simple Stepper Code

also look up the AccelStepper library

...R

Why the hell did you remove your image now? I’m out of here