A function to write several digital outputs at once (C++ level)

You may wish to revise your array indices
(Hint: You don't need pinIni and pinFinal, because specifying them incorrectly will break your function))