Is the micro software different to the nano?

I am trying to make this unit.

I have built the unit using a micro instead of a nano.

I am sure when I first started I could compile the code and load it into the micro.

Nothing happened, I assumed because I had no wires connected for the tester, I now know the micro uses different pins for SDA and SCL.

Now it is built, when I compile it, even without the micro connected, I get the error

'OCR2A' was not declared in this scope.

If I change the destination to a nano it compiles fine?

The micro is soldered into the board now so I want to try to use it.

Is OCR2A something not in the micro?

Why would I get an error when I try to just compile with 'micro' selected in the Tools/Board section and not when I have 'nano' selected?
The code is too long to fit in this page but is on the page linked above?

They use different processors.

The micro uses the atmega32u4 processor (also used in the Leonardo) instead of the atmega328 used in the UNO/Nano. OCR2A is a reference to an internal hardware timer in the atmega328.

I assume I can't use the micro then? Does the micro have an alternative to OCR2A?

You'll have to check how it's used in the code and then consult the datasheet for each processor.

OK thanks, I am going to start again with a nano.

The Micro (ATmega32U4) doesn't have Timer0 (8-bit), Timer1 (16-bit), and Timer2 (8-bit) like the UNO/Nano. It has a Timer0 (8-bit), Timer1 (16-bit), Timer3 (16-bit), and Timer4 (10-bit fast). You would have to re-write the Timer2 parts of the sketch to use Timer3 or Timer4 instead.