Wire.h

So I am working with the Wire.h Library and great except when I
try to use the end() function in the library.

I am getting a compile error stating that Wire.h has no member
named end()

I can clearly see the end() function prototyped in the Wire.h header
file, I can see the definition in the Wire.cpp file which just calls the
twi disable() function.

Not sure what is up... Any ideas?

Please do this:

  • When you encounter an error, you'll see a button on the right side of the orange bar "Copy error messages" in the Arduino IDE (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button..
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum's code tags markup to your reply.
  • Press "Ctrl + V". This will paste the error between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

If the text exceeds the forum's 9000 character limit, save it to a .txt file and post it as an attachment. If you click the "Reply" button here, you will see an "Attachments and other settings" link.

Using Arduino IDE 1.8.11
For an Arduino Uno

#include <Wire.h>

void setup()
{
  Wire.begin();
  Wire.end();
}

void loop()
{
}

No problem compiling this sketch.
That is why we need more information as pert wrote.

Is not Wire.end() be inserted at the time of program termination so that I2C Logic goes back to Port-C Logic? If so, I would like to see--

#include <Wire.h>
void setup()
{
  Wire.begin();
  ..................  //I2C related IO codes
  ...................
  Wire.end();
}

void loop()
{

}

(deleted)

Hi,
Welcome to the forum.

Please read the post at the start of any forum , entitled "How to use this Forum".
OR
http://forum.arduino.cc/index.php/topic,148850.0.html.
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easy to read.

Thanks.. Tom.. :slight_smile: