The motor board is not required to make use of an ultrasonic sensor. Here is a tutorial, but unfortunately the code part is out-dated (at the moment) because the package it relies on can't be added anymore. You can at least use it for all surrounding info. microbit-playground.co.uk/components/ultrasound-distance-sensor Then you can use the exampple on this page to send and receive pulses with your sensor: makecode.microbit.org/reference/pins/pulse-in
I needed to use the motor board to replace the electronic board of the car. (makecode.microbit.org/projects/rc-car). So the microbit is in the kitronik motor board on top of the car and its working ok. The sensor is the issue now.
Which of the examples do you want the code for? The servo motor we also use in another video in this series. The line following buggy is a kit we bought which is running the example code that comes with the kit.