Arduino Input to button control

With a lot of corrections.