Use this class to help with keeping track controls connected to a specific device pin. Using this class you will be able to update all controls as soon as a pins value changes.
The pin class: