Hi Hubert
I am not at home at the moment, but I used the code from https://community-mirror.husarion.com/t/examples-for-using-makeblock-sensors/138/3, changed the calls for LED1 to something like hLed1 because of compilation problems and used my MeDistanceSensor code.
But I can send you my full code probably later.
Michael