pins_arduino.h location

I've got a breadboarded Mega328 running on internal crystal and receiving sketches beautifully!

I want to enable and use PB6 and PB7 ( the old crystal pins ) and have reading about how to adjust the pins_arduino.h header files to include them!

Since I'm quite new to this environment, I really don't know where to put this header so my arduino sketch editor can see it! :frowning:

The tool I am using is "Atmega328 on a breadboard(8 MHz internal clock )

Can someone connect the missing Dots for me?

Why not use MiniCore instead, which already has these pins available?

Using MiniCore is the right approach here.

In recent versions of the IDE (anything that supports board manager), modifying the builtin cores is awkward and fiddly - the IDE is not meant to support that. The IDE only supports (as in, makes easy to do and doesn't fight you) modifying cores installed by putting the core files into (sketchbook)/hardware.

Guides that describe modifying pins_arduino.h (or other files in the default core) should be considered obsolete - modifying files in the default core is not something you should be doing anymore - if you need to do that, you make your own hardware package. But as noted above, it's silly to do that for this purpose as there's already a core that does all that for you (in addition to having a bunch of other improvements - I use MiniCore instead of the official cores for everything relating to 28/32 pin ATmega parts instead of the official AVR board packages), and can be installed either manually or via board manager

I agree with DrAzzy: "in general, you don't want to do that."

However, it can be useful to LOOK at the pins_arduino.h and other "variant" files, even if you don't intend to use them. If you turn on "verbose" logging for compilation, pretty much every line will include an option that includes the subdirectory "variants" like:


And that's where you'd want to look.