I need to edit twi.h and I can't find that source file.

I need to edit the twi.h file. I believe it is part of the Wire library. I am not able to find the file. I have searched the web and looked through the Arduino forum for help and have tried the suggestions there but I still can't find the file.

I am on a MacBook Air, OSX version 10.9.5 and have Arduino 1.6.5 installed. On this version it looks like the Wire library is built in.

The reason I need to edit the twi.h file is that I want to change the default i2c bus speed from 100KHz to 400KHz to try to address a problem with stepper motors running too slow from a motor shield.

Thanks.

I use Ubuntu, and it is in a hidden file in my home directory.
./.arduino15/packages/arduino/hardware/avr/1.6.2/libraries/wire/utility

Did you check ../libraries/Wire/utility ?

I searched for and found several libraries folder in various paths but none of them have a Wire folder.

I couldn't find a path on my Mac analogous to ./.arduino15/packages/arduino/hardware/avr/1.6.2/libraries/wire/utility.
Thank you for the suggestion. Still searching, though.

Ok, in other way. If it works, if it is compile, try to switch on verbose output during verify/compile process and then search output for twi.c. There should be a whole path to the file. Twi.h is in the same folder.

The reason I need to edit the twi.h file is that I want to change the default i2c bus speed from 100KHz to 400KHz to try to address a problem with stepper motors running too slow from a motor shield.

Have a look at my multispeed I2C scanner - MultiSpeed I2C Scanner - 50,100,200,400 KHz. - Libraries - Arduino Forum -
you do not need to tweak twi.c

latest version - Arduino/sketches/MultiSpeedI2CScanner at master · RobTillaart/Arduino · GitHub -

I think once you do wire.begin() you could set the appropriate register to change the speed that way.... I doubt it resets the speed every time you send something.