Unable to connect

Hello everyone, :smiley:

I am a newbie to meDevices Cayenne and I need your help, please.
My project consists of ultrasonic, LED, and motor.
The idea of the project is to get data from the ultrasonic and the LED will turn on at a specific reading from the ultrasonic and the motor will start rotating on a different reading as well.

(at the first level of reading the LED turns on, and at the second level, the motor goes on).

How can I do that?

thanks in advance!

in this where are you using cayenne??