Actually, if you confirm A4 and A6 as well, then you can replace line 68 and 69 with: 

```c
// A4, A5, A6, A7
if (pin >= 14) return pin - 10;
```