Clone wars
Cloning Arduino core ... using TIMER0 in Arduino Sometimes you want to use TIMER0 in the Arduino IDE but default inclusion of Arduino libraries means that you can't have control over TIMER0 (it is used by millis() and delay() functions). In a recent project, I wanted to use all the Atmega328 timers, and for various reasons, still use the Arduino IDE. The solution is simple . Rather than hacking the core library, we'll clone the Arduino core library, define a board that uses the core library and then hack it to our specifications. Steps: (1) Clone the Arduino core Copy the Arduino core (C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores) as "arduinohacked" - the new core directory mustn't have an underscore in it! (2) Define a new board to use the cloned core library Open "C:\Program Files (x86)\Arduino\hardware\arduino\avr\boards.txt" and put the following text at the bottom. This will define a new board in the Arduino IDE. I