GitHub claim this is 93% C and 3.8% C++, despite it being entirely in C++ (and a bit of ASM). I guess GitHub just consider that a .h file is a C file
I know it's not truly this simple, but if the file extension is ".ino", I feel like your detection algorithm should be free to use that as a massive indication it is Arduino code.
A .gitattributes file must be present with something like,
*.ixx linguist-language=C++
More info here, https://github.com/github/linguist/blob/master/docs/override...