I am using Arduino Micro. Is there any way to use PWM on pin 4 instead of Pin3 ?
I tried to change pins_Arduino.h but didnt worked.
//#define digitalPinHasPWM(p) ((p) == 3 || (p) == 5 || (p) == 6 || (p) == 9 || (p) == 10 || (p) == 11 || (p) == 13)
#define digitalPinHasPWM(p) ((p) == 4 || (p) == 5 || (p) == 6 || (p) == 9 || (p) == 10 || (p) == 11 || (p) == 13)
and
const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
////////////////////////modified///////////////
//TIMER0B, /* 3 */
//NOT_ON_TIMER,
NOT_ON_TIMER,
TIMER0B, /* 4 */
////////////////////////////////////////////////////
TIMER3A, /* 5 */
TIMER4D, /* 6 */
NOT_ON_TIMER,
NOT_ON_TIMER,
TIMER1A, /* 9 */
TIMER1B, /* 10 */
TIMER0A, /* 11 */
NOT_ON_TIMER,
TIMER4A, /* 13 */
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
};