Updated motion sensor code to work on java

Signed-off-by: Pierre <Pierre@Pierre-PC>