Copied broadcast function and remapped it's output from Serial.write() to SD.write(). This function goes in the main becuase it calls SD libraries.