igor 163 Posted October 28, 2014 Author Share Posted October 28, 2014 Thank you for the clarification about pinMode in constructor. Reasons are about what I expected, and why I was mildly surprised when the previous research I did on the topic seemed to indicate that pinMode is acceptable in constructors. Specifically, I looked at the Arduino tutorials on how to write a library: Writing a Library for Arduino http://arduino.cc/en/Hacking/LibraryTutorialHow to write libraries for the Arduino? http://playground.arduino.cc/Code/Library Both examples use pinMode in a library class constructor. (I didn't see anything in them warning that this was a bad idea "do not try this at home," explaining that it was an intentional mistake provided for instruction, or pointing to references with more detailed guidelines which provide corrective information.) Pretty lame of Arduino to put up tutorials that tell folks the wrong way to do it. (I will add something about this to my notes on porting libraries, and, when I find my arduino account information, post a suggestion that they fix the tutorials.) spirilis 1 Quote Link to post Share on other sites
spirilis 1,265 Posted October 28, 2014 Share Posted October 28, 2014 Haha! Never saw that, amazing. Good find. Sent from my Galaxy Note II with Tapatalk 4 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.