But make sure the wire is fixed to some solid place. Don't pull it!
Just in case you do not know: A6 and A7 are analog inputs only.
You cannot use them for
Even the internal pullup-resistors attached to all the other pins don't exist on A6 and A7.