'Determine action based on RESTING, BUMPED or OPENED
state'

def handle_states(self):

    if (self.state == c.RESTING):
        self.resting()
    elif (self.state == c.BUMPED):
        self.bumped()
    elif (self.state == c.OPENED):
        self.opened()
