OOP (object oriented programming)

First off, OOP is more of a programming methodology than something that requires intrinsic language support (though don't get me wrong - having such support is usually needed for successfully implementing the OOP methodology in a particular language).

The Arduino system is based off of C/C++, and since C++ is OOP, then yes "Arduino supports OOP".

With that said, you won't see many people using C++ and OOP outside of libraries with the Arduino; I am not sure why that is, but I suspect it has mostly to do with the level of most user's experience with programming, the fact that functional programming can solve 99% of problems the Arduino is used for, and the "straightforwardness" of functional programming (making it easier for beginners).

You tend to see OOP used for libraries because it provides for an easier end-user experience, plus most (all?) of the tutorials on making a library revolve around doing it in C++/OPP fashion.

There is no reason why you couldn't do the same with the rest of the system (however, setup() and loop() would have to remain functions outside of a class - but you could conceivably do everything else inside custom classes instantiated and called from those two functions); at least, I don't think there is (but I have never tried myself)...

Maybe someone else here can give more insight...?

:slight_smile: