# UART, I2C, SPI in node-red

**URL:** <https://discourse.nodered.org/t/uart-i2c-spi-in-node-red/54546>\
**Category:** General\
**Created:** [1 December 2021 05:25 UTC](https://discourse.nodered.org/t/uart-i2c-spi-in-node-red/54546 "2021-12-01T05:25:48Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![addi](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@addi](https://discourse.nodered.org/u/addi)\
**Post date:** [1 December 2021 05:25 UTC](https://discourse.nodered.org/t/uart-i2c-spi-in-node-red/54546/1 "2021-12-01T05:25:48Z")

</div>

Hello!  
Can anybody inform how to start working with UART, I2C, SPI of RPI B4 in node-red?  
If its possible  
Thanks

---

<div class="post-metadata">

**Author:** ![addi](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@addi](https://discourse.nodered.org/u/addi)\
**Post date:** [2 December 2021 03:58 UTC](https://discourse.nodered.org/t/uart-i2c-spi-in-node-red/54546/2 "2021-12-02T03:58:40Z")

</div>

please help!

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [2 December 2021 09:10 UTC](https://discourse.nodered.org/t/uart-i2c-spi-in-node-red/54546/3 "2021-12-02T09:10:14Z")

</div>

I don't know about SPI, but for using the UART there is the serial node. node-red-node-serialport

---

<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:** [2 December 2021 09:28 UTC](https://discourse.nodered.org/t/uart-i2c-spi-in-node-red/54546/4 "2021-12-02T09:28:01Z")

</div>

and node-red-contrib-i2c for low level i2c

However there are also dedicated nodes for many devices that use SPI and/or i2c - so it really depends what device you are trying to talk to.

Also don't forget to enable the required interface using the `sudo raspi-config` tool

---

<div class="post-metadata">

**Author:** ![SonoraTechnical](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sonoratechnical/32/20033_2.png) [@SonoraTechnical](https://discourse.nodered.org/u/SonoraTechnical)\
**Post date:** [2 December 2021 16:07 UTC](https://discourse.nodered.org/t/uart-i2c-spi-in-node-red/54546/5 "2021-12-02T16:07:52Z")

</div>

Let us know to what you are connecting.

---

<div class="post-metadata">

**Author:** ![addi](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@addi](https://discourse.nodered.org/u/addi)\
**Post date:** [24 December 2021 10:16 UTC](https://discourse.nodered.org/t/uart-i2c-spi-in-node-red/54546/6 "2021-12-24T10:16:55Z")

</div>

Thanks for the support!  
I started with UART, I ve done successfull data transfer via "serial" node, but already have the second day of unsuccessfull trying to receive data from another device...  
Plese get the work example cause Ive already tried all possible variants  
In Phy Ive got the signals on RPI

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [24 December 2021 10:47 UTC](https://discourse.nodered.org/t/uart-i2c-spi-in-node-red/54546/7 "2021-12-24T10:47:06Z")

</div>

> [@addi](#):
>
> already have the second day of unsuccessfull trying to receive data from another device...  
> Plese get the work example cause Ive already tried all possible variants  
> In Phy Ive got the signals on RPI

What do you mean by "another device"? Is this a sensor attached to the Raspberry GPIO pins (what sensor, which pins)? Or a sensor attached to a microcontroller such as an Arduino?

What do you mean by "In Phy I've got the signals"?  
If you have a python script which can print the sensor values, you could simply run that script via a Node-Red exec node.

It's not easy to give you a working example since you have not given any information on the device.

---

<div class="post-metadata">

**Author:** ![addi](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@addi](https://discourse.nodered.org/u/addi)\
**Post date:** [24 December 2021 11:48 UTC](https://discourse.nodered.org/t/uart-i2c-spi-in-node-red/54546/8 "2021-12-24T11:48:58Z")

</div>

Thanks for the answer!  
I use PC + USB-RS485 converter and that is "another device". In another side I use RPI UART with RS485 phy(physical layer).  
After MAX485 RO I see signals to RPI UART RX pin  
And I dont undertand about phyton scripts and exec mode, I cant use print when I need to receive

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [24 December 2021 12:11 UTC](https://discourse.nodered.org/t/uart-i2c-spi-in-node-red/54546/9 "2021-12-24T12:11:41Z")

</div>

It seems possible that I misunderstood your previous post, in which case python is not relevant.

---

<div class="post-metadata">

**Author:** ![addi](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@addi](https://discourse.nodered.org/u/addi)\
**Post date:** [24 December 2021 12:44 UTC](https://discourse.nodered.org/t/uart-i2c-spi-in-node-red/54546/10 "2021-12-24T12:44:02Z")

</div>

so I still need an example of serial receive, I couldnt find it yet on net and on forum

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [22 February 2022 12:44 UTC](https://discourse.nodered.org/t/uart-i2c-spi-in-node-red/54546/11 "2022-02-22T12:44:43Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
