SofaPirate / Plaquette

Object-oriented Arduino library for creative physical computing
https://sofapirate.github.io/Plaquette/
GNU General Public License v3.0
15 stars 4 forks source link

DigitalOut example - SINK and SOURCE #85

Open eringee opened 8 months ago

eringee commented 8 months ago

For the online documentation http://sofapirate.github.io/Plaquette/DigitalOut.html

The introduction of the SINK and SOURCE mode to beginners can be confusing and also unnecessary, since DigitalOut defaults to SINK mode anyways.

Recommendation: in the example code and the documentation, instead of this:

#include <Plaquette.h>

DigitalOut led(13, SINK);

Do this:

#include <Plaquette.h>

DigitalOut led(13); 

//it is possible to operate the DigitalOut in SOURCE mode, for example if you are powering a common anode RGB LED
//DigitalOut led(13, SOURCE); 

Another suggestion is to replace the potentially confusing terms of SINK and SOURCE with terms like DIRECT and INVERTED.