const int nextbutton = 41;
const int backbutton = 40;
You gave the pins meaningful names.
int buttonstate = 0;
int buttonstate2 = 0;
int lastbuttonstate = 0;
int lastbuttonstate2 = 0;
Then, you gave the state variables stupid names. Why? currNextState, prevNextState, currBackState, and prevBackState would make so much more sense.
Why are all those useless delay()s in your program?
You REALLY need to explain the relationship between the next and back switches and satpos and satdirection.
Setting satdirection every time the next or back switches are pressed doesn't make sense. The direction to step depends on the current position and the desired position, NOT which switch is pressed.