Can you tell me what this means and

Search for floating input, this is a common question for newbies, it shows up in various ways.

From the processor point of view there are 2 and only 2 possible states a pin can be in: 0 or 1. An unconnected input can only be one or the other, which one will be unknown until you read the pin.

I2C is designed to allow 2 or more devices to communicate over the same wires. There has to be a way to allow any device to transmit data without the others interfering. Open collector or open drain means a device can drive SDA or SCL low but not high. No device on an I2C can output high, only low. If no device can output high something else has to do that instead, which is what the pull up resistors do.

TheMemberFormerlyKnownAsAWOL: What is attached to the pin in question?

Nothing other than the scope.

PerryBebbington: I2C is designed to allow 2 or more devices to communicate over the same wires. There has to be a way to allow any device to transmit data without the others interfering. Open collector or open drain means a device can drive SDA or SCL low but not high. No device on an I2C can output high, only low. If no device can output high something else has to do that instead, which is what the pull up resistors do.

Does this mean that any device attached to the SDA pin is talking to it even though the sketch may have no intention to try and control(signal ?) it ? As an example, the Blink example sketch does not use the SDA pin but there might be an SDA device attached to it. Is there interaction between the pin and the processor ? ( I dont know who/what controls the SDA pin. Is there a separate chip on the Feather board that handles this ?) I may be getting too deep into the weeds here.

If your sketch is not performing I2C transfers, there doesn't need to be anything connected.

If your sketch is performing I2C operations, you will have at least one other device connected. One will be the master for an transfer, one will be the slave. The master drives the clock for data going out and in.

If you are not using I2C, the pin is commanded like an other IO pin for reads and writes or PWM or whatever.

Like any other IO pin, the pin should not be left floating, as it can fluctuate. It should be pulled High or Low to a valid level to reduce energy use, especially important battery operation. With Atmega328P & similar, internal pullups can be used for that. I don't know what ESP32 has. Fluctuating pins lead to internals switching, which leads to higher current draw.

hextejas:
Does this mean that any device attached to the SDA pin is talking to it even though the sketch may have no intention to try and control(signal ?) it ?
As an example, the Blink example sketch does not use the SDA pin but there might be an SDA device attached to it. Is there interaction between the pin and the processor ? ( I don’t know who/what controls the SDA pin. Is there a separate chip on the Feather board that handles this ?)

I2C is designed around the idea of 1 master and 1 or more slaves. If you look at any I2C slave device (an I2C OLED display for example) it will have an address. Usually it will have a choice of addresses that you can set with jumpers, for example I have some OLED displays that can have the address 0x78 or 0x7a, this is set by a solder bridge on the board. All I2C devices on the same bus must have different addresses. When the master wants to communicate with a slave it send the address first, this tells the slaves which one is to respond. The others then ignore the data on SDA. The master sends commands and data to the slave. If the master wants data from the slave it sends a command telling the slave to reply with the required data. SCL clocks the data on the bus in either direction.

I2C is normally taken care of by dedicated hardware in the microcontroller that is designed to do in hardware all the I2C functions. This means the processor can instruct the hardware to transfer some data then go and do something else while the hardware takes care of the data transfer.

It is also possible to implement I2C in software, you will see this referred to as ‘bit banging’, which is a crude way of saying the processor has to set and clear SCL and SCA using software for every single bit. Software I2C is very processor intensive and very slow. My first use of I2C was on a Z80, I wrote a soft I2C interface in Z80 assembly language and it took, so far as I can remember, about 1 second to read the temperatures from 4 I2C temperature sensors.

I get the concept of master and slave. It sounds a bit like ethernet. So, how do i tell the circuit (?), that the Arduino is the master? And do I need to do something to each slave, (I have 2) to indicate that they are slaves ? Probably, at least assure that they have unique addresses. Is this what the pull-up, pull-down resistor is supposed to do, indicate that a slave is present? Given the need for a resistor it seems that the explanation should be more clear as to its value.

There is no pulldown resistor on I2C, just a pullup.

The pullup is there because the open-collector can only pull down, so something else has to return the line high.

The only thing that indicates that a slave is present is the slave’s response to the master.

I get the concept of master and slave. It sounds a bit like ethernet.

Hmmm, not really like ethernet.

So, how do i tell the circuit (?), that the Arduino is the master?

On the Arduino you use

Wire.begin();

in setup, that makes it the master. Most of the devices you are likely to connect to I2C are slaves and have addresses. There is no option for them to be master (how could an OLED display be a master?).

Is this what the pull-up, pull-down resistor is supposed to do, indicate that a slave is present?

No, see my reply #11

Given the need for a resistor it seems that the explanation should be more clear as to its value.

2k2 or thereabouts will be fine.

The short answer is it means that pin #20 is a GPIO that doubles as the SDA I2C pin (Bi-Directional Serial Data signal) and pin#21 is a GPIO that doubles as the I2C SCL (Serial Clock). The typical pullup value used is 4.7k or 10k but as shown the value is not fixed because it is based on how many devices are on the bus. For a small number of devices 4.7k is fine. For larger numbers of devices you need to look up the value on the pullup reference page of the I2C standards doc. That's pretty much all it means.

I have been reading more and more about this and came across this drawing. Could you tell me if this is an accurate representation of what you mean by a pull-up resistor ? I was planning on using this in my project where VDD is +5V. What happens if the device already has a pull-up resistor ?

|500x200

I2CDiagram.png|900x360

TheMemberFormerlyKnownAsAWOL: There is no pulldown resistor on I2C, just a pullup.

The pullup is there because the open-collector can only pull down, so something else has to return the line high.

The only thing that indicates that a slave is present is the slave's response to the master.

How can that work ? Does the master issue a general purpose request to see if anyone is listening ? I was wondering how the master can respond to the slave if the master doesn't know the slaves address. Perhaps the slave announces itself when it attaches ? Very curious.

Could you tell me if this is an accurate representation of what you mean by a pull-up resistor ?

There is a clue: "RP"

raschemmel:
There is a clue: "RP

I guess this is not it.

RP
It’s a sexual roleplay game where you take on the role of a character and do whatever it takes to earn a sexual response. It is a sexual relationship designed to provide for a sexual relationship of similar character. It is not a family relationship.

Does the master issue a general purpose request to see if anyone is listening ? I was wondering how the master can respond to the slave if the master doesn't know the slaves address. Perhaps the slave announces itself when it attaches ? Very curious.

I don't think anyone said that it could. The master only talks to known slaves. Your code needs to have the I2C address. This sometimes comes up as an issue for I2C LCD displays where the user doesn't know the address. In that case they run the I2C scanner and it "goes out " and finds all the slaves and reports their address. You could call it a "Slave Finder" but what with everything going on right now that might not be politically correct. It's best just to call it the I2C SCANNER.

Rp It's a sexual roleplay game where you take on the role of a character and do whatever it takes to earn a sexual response. It is a sexual relationship designed to provide for a sexual relationship of similar character. It is not a family relationship.

I thought RP would obviously mean ResistorPULLUP, but that's just me. And FYI, "RP" does NOT equal "RP". (P is a SUBSCRIPT)

This reads verbally as "R sub P equals Resistor, pullup"

raschemmel:
There is a clue: “RP

My snide response aside, actually it does not. RP could be either Resistor Pull-Up or Resistor Pull-Down, although member AWOL says that there is no such thing as a Pull Down.

No, I never said there is no such thing as a pull down, because that would be stupid.

I’m not stupid.

No, I never said there is no such thing as a pull down, because that would be stupid.

RP could be either Resistor Pull-Up or Resistor Pull-Down, although member AWOL says that there is no such thing as a Pull Down.

Actually it could NOT be a pulldown because it is connected to VDD , which by definition is "UP". Just for the record, GND is "DOWN". So if the resistor labeled RP had the lower end connected to GND, then it would indeed be a "PULLDOWN" , but the image you posted shows it connected to Vcc ,(which is UP, just FYI)

TheMemberFormerlyKnownAsAWOL: No, I never said there is no such thing as a pull down, because that would be stupid.

I'm not stupid.

I apologize for any offense AWOL, but that is how I read this.

There is no pulldown resistor on I2C, just a pullup.

The pullup is there because the open-collector can only pull down,

What AWOL is saying here is that “Open-Collector” is a reference to the COLLECTOR of a TRANSISTOR, WHICH
because it is the COLLECTOR, and the transistor is an NPN, it CANNOT be connected to GND (which is DOWN),
so , by definition, an NPN transistor collector can only be pulled UP (like to Vcc).
In order for this to make sense to you , you would first need to know what a transistor is and how it works.
And secondly, you would need to know what “open-collector” means and what it’s application is. You would also
need to be aware that in electronics, the convention with respect to schematic illustration, is that the POSITIVE
supply (Vcc/Vdd) is at the TOP of the page and the GND or negative supply is at the bottom of the page. Hence
the origin of the “up” in “pullup” or the “down” in “pulldown”.

Do you ?