Need Help For Grove Base Hat + Grove Ultrasonic Ranger

Hi !

For a project, i would like to play a song everytime someone pass less that 100cm from my Ultrasonic Ranger.

I was able to write the code while the GPIO were naked, but I just struggle to define my pin, my in and out and everything with the base on. I would like to keep it, for ergonomy.

If Someone Know How to write that, maybe, with # to make me understand the process (i don’t ask for so much … but), I would be really pleased !