Updated after testing on Arduino

Now that userAdjust() is a double, not a void, I had to replace the break; statements with return thingToAdjust; statements.