My bad...
It's my first time mapping anything, so I decided to ask for advice as well as advice on code for arming code.
But for arming without a human operated pot, the code you provided will assist me in my build.
That being said, do you think the ESC will arm as it does if I sent 1000 instead of 2000. And will it arm so that if i send a 1000 when it is armed the motor wont spin as fast, or will it still be at full throttle?