added getter and setter for degital sensor