# Using Ultrasonic sensor with node-red

* First you need to install node-red-node-pisrf

![](/files/-MDU1F7EuS2j2viw3dTs)

* After you install node-pisrf already you will see rpi-srf in Raspberry Pi column. Then you just drag and drop as figure below:

![](/files/-MDU1fraXhO5J6FjmGBd)

* Then you need to connect Ultrasonic sensor with Raspberry Pi. You can connect as pin below:

![](/files/-MDU3QkpBQdbpMQ3uKnj)

* After connect Ultrasonic sensor with raspberry Pi already now back to the node-red and do as below:

![](/files/-MDU4Db1xj7E1xXht4fD)

Add debug and connect it as below:

![](/files/-MDU4xkIzN6Uuy8NdcVl)

* Add dashboard

![](/files/-MDU5Gv5NgvR3DFZDTml)

* Double on gauge

![](/files/-MDU6fXjzXUXvs3E53RX)

![](/files/-MDU6Fmx_OF-7d7lmWbD)

![](/files/-MDU7ot_-wJc2Xb5Uj5w)

![](/files/-MDU83txYfEXHp2t3RAJ)

![](/files/-MDU8G6ki9-IgXt1-8fW)

![](/files/-MDU9iFqZJDYRrWy-LNn)

* Then it will bring you into this dashboard page.

![](/files/-MDU8wkTQwrxeEkigvbj)

Now back to node-red and click on gauge again and change Units and Range and Deploy it again.

![](/files/-MDUA0X0kCFXXdgvTU5E)

Then back to Dashboard page you will see

![](/files/-MDUAEuqi5XU_1tAVp81)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aic-eec.com/general/node-red/get-start-with-node-red/untitled-4.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
