GPIO hook method implemented in Controller.java