but it made it easier for me to read)
Using Tools + Auto Format before posting code would make it easier for ME to read.
Consistently placing the { (I prefer on a new line) makes it easier to read the code.
Using names like lastBtnUp and prevBtnUp in the same code REALLY makes it hard to follow. If a variable contains a state, the name should reflect that. If a variable contains a time, the name should reflect that.
I'm using the blink program to run a motor
A motor connected to the ledPin? Being turned on and off by the ledState variable? Why? You don't have a damned LED connected.
Anyway, that code does something. You want it to do something. Presumably, those two somethings are not the same thing, or you wouldn't still be looking for help. What either of those two somethings is, though, is not clear.