# Control Tx/Rx pin with another GPIO pin / sensor

**URL:** <https://discourse.nodered.org/t/control-tx-rx-pin-with-another-gpio-pin-sensor/1794>\
**Category:** General\
**Created:** [24 July 2018 20:30 UTC](https://discourse.nodered.org/t/control-tx-rx-pin-with-another-gpio-pin-sensor/1794 "2018-07-24T20:30:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Popo21](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@Popo21](https://discourse.nodered.org/u/Popo21)\
**Post date:** [24 July 2018 20:30 UTC](https://discourse.nodered.org/t/control-tx-rx-pin-with-another-gpio-pin-sensor/1794/1 "2018-07-24T20:30:27Z")

</div>

Hello, I am a newbie on raspberry pi. I want to ask about controling Tx/Rx pin using another pin. I want make a project to control Rx pin with ultrasonic sensor. The propose system like this, if the distace \> 30 cm, the Rx pin didnt receive any data and if the distance \<=30 cm, the ultrasonic sensor will trigger Rx pin to receiver any data from another device. Is it possible ?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [24 July 2018 20:48 UTC](https://discourse.nodered.org/t/control-tx-rx-pin-with-another-gpio-pin-sensor/1794/2 "2018-07-24T20:48:48Z")

</div>

If the tx/Rox is being used for serial then the grip can’t just grab/stop it. But you could use the grip to decide or gate any data you may want to send to it
