# Stopping a GrovePi sensor with a button using Node-RED

**URL:** <https://discourse.nodered.org/t/stopping-a-grovepi-sensor-with-a-button-using-node-red/1158>\
**Category:** Dashboard\
**Created:** [28 June 2018 14:01 UTC](https://discourse.nodered.org/t/stopping-a-grovepi-sensor-with-a-button-using-node-red/1158 "2018-06-28T14:01:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabrieldicieri](https://avatars.discourse-cdn.com/v4/letter/g/9dc877/32.png) [@gabrieldicieri](https://discourse.nodered.org/u/gabrieldicieri)\
**Post date:** [28 June 2018 14:01 UTC](https://discourse.nodered.org/t/stopping-a-grovepi-sensor-with-a-button-using-node-red/1158/1 "2018-06-28T14:01:24Z")

</div>

(sorry for my english, im from brazil) Im using a GrovePi board with a ultrasonic sensor attached, the sensor sends values to my graph and i want to stop this with a dashboard button, im trying to stop using a button who send msg.status = 1 and msg.status = 0 when press. i will put the images of what im trying to do, thanks for the support.!

 ![2018-06-28-105937_1440x900_scrot](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/98e965145f0fbc62afc2bce857723f550555ced6.png)

---

<div class="post-metadata">

**Author:** ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)\
**Post date:** [28 June 2018 21:05 UTC](https://discourse.nodered.org/t/stopping-a-grovepi-sensor-with-a-button-using-node-red/1158/2 "2018-06-28T21:05:00Z")

</div>

Ola Gabriel, seja bem vindo.

Please have a look on below link. I believe it will meet your requirements.

[Simple gate to switch on and off a flow](https://flows.nodered.org/flow/a985944e789d90e0cd2008d85b7aaa65)

---

<div class="post-metadata">

**Author:** ![gabrieldicieri](https://avatars.discourse-cdn.com/v4/letter/g/9dc877/32.png) [@gabrieldicieri](https://discourse.nodered.org/u/gabrieldicieri)\
**Post date:** [28 June 2018 23:16 UTC](https://discourse.nodered.org/t/stopping-a-grovepi-sensor-with-a-button-using-node-red/1158/3 "2018-06-28T23:16:45Z")

</div>

Thank you so much, problem solved here!

---

<div class="post-metadata">

**Author:** ![drmibell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drmibell/32/8424_2.png) [@drmibell](https://discourse.nodered.org/u/drmibell)\
**Post date:** [30 June 2018 17:30 UTC](https://discourse.nodered.org/t/stopping-a-grovepi-sensor-with-a-button-using-node-red/1158/4 "2018-06-30T17:30:17Z")

</div>

> [@Stopping a GrovePi sensor with a button using Node-RED](https://discourse.nodered.org/t/stopping-a-grovepi-sensor-with-a-button-using-node-red/1158/3):
>
> Thank you so much, problem solved here!

I am glad you found a solution. I had not understood your problem clearly, or I would have suggested that it could be solved a bit more simply using either [node-red-contrib-traffic](https://flows.nodered.org/node/node-red-contrib-traffic) or a node I have developed but not yet published, [node-red-contrib-gate](https://github.com/drmibell/node-red-contrib-gate). My node can be downloaded from GitHub and [installed locally with npm](https://nodered.org/docs/creating-nodes/first-node#testing-your-node-in-node-red); if you use it please post any feedback you might have.
