Need help with an idea

ac5ff:
The problem I forsee is this should run once and not be needed again. Can I put something like this routine in a Setup() section? I'm way to new at writing code like this to be sure.

Yup, it belongs in setup().

Unless … unless at some point in the future you might want to supply your device with a "re-home" button.