In line 14 definition "architecture": "avr" should be "architecture": "megaavr". Otherwise it will not work with arduino IDE and its libraries.