Wire.h 's rules are violated by every sda and sdl using devices?

Hello amazing people!
this link says:

Please note that a pull-up resistor is needed when connecting SDA/SCL pins

link is:Wire - Arduino Reference

I have never pulled these pins up whenever required,like in LUX sensor,or BME 280......
I also checked their libraries and also wire library....but these pins weren't pulled up any where....
whats wrong here?
Am i interpreting anything wrong here????
thanks already

A lot of sensors, such as BME280 based ones may have physical pullups on the board, if you look.

I guess they may do this because some Arduino users apparently dont follow the advice and fit the required resistors.

Even if the Wire or sensor libraries were to use the internal pullups on the I2C pins, they are fairly high values and may leed to a non-functioning or unreliable I2C bus.

Wire.h is a software library, its not its responsibility to ensure that the correct hardware (i.e. resistor pullups) are fitted and of the correct value.

thanks for the reply bro

Even if the Wire or sensor libraries were to use the internal pullups on the I2C pins, they are fairly high values and may leed to a non-functioning or unreliable I2C bus.

HOW?

Wire.h is a software library, its not its responsibility to ensure that the correct hardware

whats is software library and why shouldnt it do so.....after all its supposed to deal with sda and scl all the time....
thanks already :slight_smile:

HOW?

Because I2C needs fairly low values to operate correctly, like I said.

whats is software library and why shouldnt it do so.....after all its supposed to deal with sda and scl all the time....

Software libraries do not carry out hardware checks on interfaces to test if they have been installed correctly, the hardware does not have the capability either.

If you think the Wire.h library should somehow be checking that the correct external resistors are fitted, make the suggestion to the library authors, although how in practice that could work, I dont know.

Thanks man that makes sense

Because I2C needs fairly low values to operate correctly

how could you say so........where can i learn all this....for it seems damn new to me

Doesn't just about every subject seem new, when you are starting out?

I donno the standards by which i would scale myself......did an arduino book called piece of cake,,,,.....did a project with arduino and hall sensors......and just now ended a major project with nodeMCU as a data logger in agriculture and green houses...thats it bro

The Wire library does use the internal pullup resistors. Use of the pullup resistors is mentioned in the datasheet as a possible solution.

Wire/src/utility/twi.c lines 76 and 77.

Use of the pullup resistors is mentioned in the datasheet as a possible solution.

libraries have data sheet?
where can i get this one?

The datasheet for the microcontroller. You have the source code for the library it comes with the IDE.

The pullup resistors are an I2C hardware requirement, not a software requirement.

If you don't have them, or the values are too high, nothing will work.

I2C is a special purpose bus, intended for communications between ICs on a circuit board. It was never intended to be used with jumper wires, and you will run into problems with long wires, as discussed here.