# I2c help with baby steps please

**URL:** <https://discourse.nodered.org/t/i2c-help-with-baby-steps-please/31582>\
**Category:** General\
**Created:** [15 August 2020 07:37 UTC](https://discourse.nodered.org/t/i2c-help-with-baby-steps-please/31582 "2020-08-15T07:37:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Truman](https://avatars.discourse-cdn.com/v4/letter/p/b38774/32.png) [@Peter\_Truman](https://discourse.nodered.org/u/Peter_Truman)\
**Post date:** [15 August 2020 07:37 UTC](https://discourse.nodered.org/t/i2c-help-with-baby-steps-please/31582/1 "2020-08-15T07:37:39Z")

</div>

Hi - new to everything (raspberry pi, python, node-red) but some experience with i2c  
I have built a board for my Pi that has a number of i2c devices (RTC, ADC, DAC and I/O expansion) - I have all of these working in python via thonny

I'm working on getting them working (specifically the I/O, ADC and DAC) with Node-Red

I ran i2cdetect -y 1 straight after a reboot and can clearly see 4 i2c parts (0x0c, 0x20, 0x4d and 0x68 in the table (0x20 (decimal 32) is the PCF8574 I/O expansion chip I'm working on for the moment) - (I can confirm that this part works fine in Python on this address)

I've installed

```auto
npm install --unsafe-perm node-red-contrib-i2c

```

In ~/.node-red of my pi - as instructed [here](https://flows.nodered.org/node/node-red-contrib-i2c)

I have this flow to start with

```auto
[{"id":"78223869.732038","type":"tab","label":"Flow 4","disabled":false,"info":""},{"id":"d2a792fc.0850c","type":"debug","z":"78223869.732038","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":390,"y":100,"wires":[]},{"id":"e72af964.8aa9c8","type":"inject","z":"78223869.732038","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":80,"y":140,"wires":[["8d06713c.e47d4"]]},{"id":"bbf568e2.860b78","type":"debug","z":"78223869.732038","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":390,"y":180,"wires":[]},{"id":"8d06713c.e47d4","type":"i2c scan","z":"78223869.732038","name":"","busno":"1","x":240,"y":140,"wires":[["d2a792fc.0850c"],["bbf568e2.860b78"]]}]

```

My debug output appears to show nothing of value like this  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/2/42ba6d10c0dcdbe553bc9fb9cd6c833725eb0d42.png)

Once I run that - if I try i2cdetect -y 1 again, I see this (which is puzzling)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/d/0d0abf61c11ccbf2d5945a8827164727c28152e7.png)

It seems quite hard to find any clear instruction about how to use the i2c nodes (but I am a newbie and a bit thick - so that could just be me)

If anyone could help me make any sens of this I would be really grateful. Thanks in advance

BTW - what is the correct term for a board on which the Pi is fitted (as opposed to a HAT which is fitted to the Pi)? I've built my own development board and I'm not sure if that would be called a boot, sole, foot or some other equally odd name?

---

<div class="post-metadata">

**Author:** ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)\
**Post date:** [15 August 2020 11:20 UTC](https://discourse.nodered.org/t/i2c-help-with-baby-steps-please/31582/2 "2020-08-15T11:20:55Z")

</div>

I don't think the NR i2c node is multimaster, so you can only have one master in the bus.  
Or NR or shell.  
Looks like the bus is working, so now you can build your flows.

---

<div class="post-metadata">

**Author:** ![Peter\_Truman](https://avatars.discourse-cdn.com/v4/letter/p/b38774/32.png) [@Peter\_Truman](https://discourse.nodered.org/u/Peter_Truman)\
**Post date:** [15 August 2020 22:09 UTC](https://discourse.nodered.org/t/i2c-help-with-baby-steps-please/31582/3 "2020-08-15T22:09:59Z")

</div>

? I only have 1 master, the other parts are all slaves. As shown i2cdetect gives a sensible result when run the first time, but nonsense when run again after starting node red.

Part of my problem seems to be not being able to find any deep dive documentation on the subject.

---

<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:** [14 October 2020 22:10 UTC](https://discourse.nodered.org/t/i2c-help-with-baby-steps-please/31582/4 "2020-10-14T22:10:05Z")

</div>

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