Wire.h Location Windows 10 (2021)

Hi all,

I have read lots of post about the location of the wire.h library but I can't find the library in my machine. I only can find the one I have installed. Could anyone guide me through where to find wire.h library? I just want to change the buffer size to 64. Thanks in advance.

@khar Go to the path: C:...........\Arduino\hardware\arduino\avr\libraries\Wire\src\Wire.h in your computer.

hi @dozie

Thanks for your reply. I do not have that directory I am not sure why.

That is why I am struggling with this wire.h location. In my sketch is included and all and is working fine, but I cant find it. Would you have another suggestion? Thanks in advance.

Hi @khar. I'll share a technique you can use to find the location of most any library.

Try this:

  1. Select the board you are interested in from from the Arduino IDE's Tools > Board menu. Note that you might have multiple versions of a library installed on your computer and the active version may depend on which board you compile for. This is the case with the Wire library. Each boards platform has its own version of the Wire library. So the Wire library that is used when compiling for the Uno is completely different from the one used when compiling for the Nano 33 IoT, and so on. This isn't apparent to the user because the libraries have a standardized API.
  2. Select File > Examples from the Arduino IDE's menus.
  3. Open any example sketch from the library you want to find.
  4. Select Sketch > Show Sketch Folder from the Arduino IDE's menus. This will open the example sketch's folder under the examples subfolder of the library folder.

You can now navigate up a couple of folder levels to get to the library root folder. The library's source code will either be found there or else in the src subfolder.

Hi @pert,

Thanks so much for your reply. Unfortunately that did not work either, it took me to a temp folder and there was nothing when navigating up in any subfolder, basically I was in the win temp folder. However, I found what the issue was. I had installed the beta IDE. I decided to uninstalled it and install Arduino IDE 1.8.15. Now I can see the library under the path @dozie had mentioned.

I hope this will not be an issued for the next release. Thank for your help guys. =)

Right click and edit the "Wire" (header file) file in the screenshot you posted with a text editor like notepad++, you will see
#define BUFFER_LENGTH 32

Thanks dozie,

That's is what I'm intending to do. I'll try tomorrow and see how it goes. I saw there are two buffer length = 32. I'll try both.