Increment bit value with loop

currently, I am working on a school project that involves controlling a DC motor with a chopper circuit (DC drive). as of now, we have to manually enter a bit value in the serial monitor from 0-255 to control the speed of the motor. what I want is for the bit value to increment with a counter. that is I want it to start at a given value, let's say 10, and then increment 1 bit every loop until it reaches 255. I do not want to enter any value in the serial monitor

Do you want the value to go 1,2,3,4 etc or 1,2,4,8 etc ?

Good idea. What's preventing you from doing this?

int x=10;
x++; //add one