You can keep your code if you switch to a Nano, you will gain two additional A/D inputs. It may even be less expensive.