The reported error message prompted you to look for duplicate declaration of setup() function which is not the case. Therefore, it is very probable that there are one or more syntactical/semantics errors in the codes under the setup() function which have been pointed out in post #3 by @qubits-us.