Taking into account Pascals comments. Not yet tested on actual sensor though