Changing int numbers with external means

Take a look at the StateChangeDetection example in the IDE