sparkfun / Arduino_Boards

Board definitions for SparkFun-manufactured AVR, ARM, and ESP-based Arduino boards.
263 stars 125 forks source link

LilyPad USB Plus - incorrect PWM definition #109

Open oqibidipo opened 1 year ago

oqibidipo commented 1 year ago

Somebody forgot to move this timer definition from pin 3 to pin 10.

https://github.com/sparkfun/Arduino_Boards/blob/main/sparkfun/avr/variants/lilypadusbplus/pins_arduino.h#L268

const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
    NOT_ON_TIMER,
    NOT_ON_TIMER,
    NOT_ON_TIMER,
    TIMER0B,//3      <--  should be on pin 10
    NOT_ON_TIMER,
    NOT_ON_TIMER,
    TIMER0A,//6
    TIMER4D,//7
    TIMER1A,//8
    NOT_ON_TIMER,
    NOT_ON_TIMER,    <--  here
    NOT_ON_TIMER,
    TIMER1B,//12
    TIMER3A,//13
    TIMER4A,//14

Reference: https://forum.arduino.cc/t/lilypad-usb-plus-and-pwm-on-pin-10/1125389