Control a gearmotor whit the Serial Port

Hi!. I'm triyng to control a gearmotor, connected to an H bridge, with the serial port.
The gearmotor is going to move a base in a lane and i want send the position where i want the base through the serial port, for example: to send the number 40 and move the base to the position 40. all this without sensors.

I think program an internal timekeeper and control the time that the motor is on.

someone could give me ideas to do this with or without the timekeeper?

Thanks.

I think program an internal timekeeper and control the time that the motor is on.

So you can guess where the motor is?

someone could give me ideas to do this with or without the timekeeper?

Reading data from the serial port is trivial. Serial Input Basics

Without sensors or a stepper you will suffer from drift in position, it is unavoidable. The amount of drift
depends on a lot of things, but be warned.

Are you able to drive the motor fine?

Are you able to read from Serial?

Then you need to devise a coding for your motion commands and implement code to read
those commands and drive the motor appropriately - you aren't clear on which part of this
is causing you problems.