[Solved] PinMode in Object Constructors/Functions?

We had issues early on when porting Arduino libraries with hardware calls (pinMode, Serial, digitalWrite) in constructors, but we fixed that so you should be ok. That said if I was designing a new library, I would put all of the hardware initialization in the begin() method which would be called in setup().

2 Likes