My question is a basic one regarding coding. I am trying to define a function/subroutine. What would the syntax of that be?
I want to use it to turn on a specific series of WS2812 LEDS. I thought If I could define a piece of code that would just switch them on I could call it in my main programme whenever I wanted.
You define a function outside of the setup and loop functions - the syntax is exactly the same as the build in setup and loop. For example, to define a new function turnOnLEDs