In this short I demonstrate the complexity of controlling a 2-wire fan via a TIP120 transistor to control the voltage.
It may seem simple to just adjust a motors voltage, but in practice there are many elements to be careful of for your Arduino or Raspberry Pi projects!