septillion:
Then why is you're code full of them? 
Delay() stops everything dead in it's tracks, it's called blocking code. And because a micro can only do one thing at a time (even if that single thing is waiting) you are stuck.
Thing to do, start over! And this time don't use delay() anywhere! Have a look at Blink without delay.
I have an UNO R3 and the delays I have in it are needed for the LED blink pattern and the buzzer. Is there any way around just not using it? I'll try and use blink without delay for the LED pattern but it doesn't seem to explain the reason that my code stopped working.
The code already uploaded to the board when it worked and is still on it but the code that I uploaded to it now just gives errors.
Error messages:
Arduino: 1.8.5 (Mac OS X), Board: "Arduino/Genuino Uno"
/Users/Louis/Documents/Arduino/siren/Ambulance.ino:93:11: error: redefinition of 'const int stepsPerRevolution'
const int stepsPerRevolution = 300;
^
/Users/Louis/Documents/Arduino/siren/siren.ino:93:11: note: 'const int stepsPerRevolution' previously defined here
const int stepsPerRevolution = 300;
^
/Users/Louis/Documents/Arduino/siren/Ambulance.ino:95:19: error: redefinition of 'Stepper myStepper'
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);
^
/Users/Louis/Documents/Arduino/siren/siren.ino:95:9: note: 'Stepper myStepper' previously declared here
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);
^
/Users/Louis/Documents/Arduino/siren/Ambulance.ino:97:5: error: redefinition of 'int speakerPin'
int speakerPin = 12; //Speaker or Piezo buzzer on pin 11
^
/Users/Louis/Documents/Arduino/siren/siren.ino:97:5: note: 'int speakerPin' previously defined here
int speakerPin = 12; //Speaker or Piezo buzzer on pin 11
^
/Users/Louis/Documents/Arduino/siren/Ambulance.ino:98:5: error: redefinition of 'int bluePin'
int bluePin = 3;
^
/Users/Louis/Documents/Arduino/siren/siren.ino:98:5: note: 'int bluePin' previously defined here
int bluePin = 3;
^
/Users/Louis/Documents/Arduino/siren/Ambulance.ino:99:5: error: redefinition of 'int redPin'
int redPin = 4;
^
/Users/Louis/Documents/Arduino/siren/siren.ino:99:5: note: 'int redPin' previously defined here
int redPin = 4;
^
/Users/Louis/Documents/Arduino/siren/Ambulance.ino: In function 'void setup()':
/Users/Louis/Documents/Arduino/siren/Ambulance.ino:101:6: error: redefinition of 'void setup()'
void setup()
^
/Users/Louis/Documents/Arduino/siren/siren.ino:101:6: note: 'void setup()' previously defined here
void setup()
^
/Users/Louis/Documents/Arduino/siren/Ambulance.ino: In function 'void loop()':
/Users/Louis/Documents/Arduino/siren/Ambulance.ino:110:6: error: redefinition of 'void loop()'
void loop()
^
/Users/Louis/Documents/Arduino/siren/siren.ino:110:6: note: 'void loop()' previously defined here
void loop()
^
/Users/Louis/Documents/Arduino/siren/Ambulance.ino: In function 'void beep(unsigned char, int, long int)':
/Users/Louis/Documents/Arduino/siren/Ambulance.ino:115:6: error: redefinition of 'void beep(unsigned char, int, long int)'
void beep (unsigned char speakerPin, int frequencyInHertz, long timeInMilliseconds) //code for working out the rate at which each note plays and the frequency.
^
/Users/Louis/Documents/Arduino/siren/siren.ino:115:6: note: 'void beep(unsigned char, int, long int)' previously defined here
void beep (unsigned char speakerPin, int frequencyInHertz, long timeInMilliseconds) //code for working out the rate at which each note plays and the frequency.
^
/Users/Louis/Documents/Arduino/siren/Ambulance.ino: In function 'void song()':
/Users/Louis/Documents/Arduino/siren/Ambulance.ino:129:6: error: redefinition of 'void song()'
void song()
^
/Users/Louis/Documents/Arduino/siren/siren.ino:129:6: note: 'void song()' previously defined here
void song()
^
/Users/Louis/Documents/Arduino/siren/Ambulance.ino:149:25: error: too many arguments to function 'int digitalRead(uint8_t)'
if (digitalRead (3, HIGH)
^
In file included from sketch/siren.ino.cpp:1:0:
/private/var/folders/b5/n22h59893d5dcjx41y7d_y_m0000gp/T/AppTranslocation/D985ACC2-02C4-472E-BD40-959C4826594D/d/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h:135:5: note: declared here
int digitalRead(uint8_t);
^
/Users/Louis/Documents/Arduino/siren/Ambulance.ino:150:3: error: expected ')' before '{' token
{
^
/Users/Louis/Documents/Arduino/siren/Ambulance.ino:152:1: error: expected primary-expression before '}' token
}
^
/Users/Louis/Documents/Arduino/siren/Ambulance.ino: At global scope:
/Users/Louis/Documents/Arduino/siren/Ambulance.ino:155:5: error: expected constructor, destructor, or type conversion before '(' token
beep(speakerPin, NOTE_C5, 300); // beep( -PIN OF SPEAKER-, -THE NOTE WANTING TO BE PLAYED-, -DURATION OF THE NOTE IN MILISECONDS- )
^
/Users/Louis/Documents/Arduino/siren/Ambulance.ino:156:6: error: expected constructor, destructor, or type conversion before '(' token
delay(100);
^
/Users/Louis/Documents/Arduino/siren/Ambulance.ino:157:5: error: expected constructor, destructor, or type conversion before '(' token
beep(speakerPin, NOTE_A5, 300);
^
/Users/Louis/Documents/Arduino/siren/Ambulance.ino:158:6: error: expected constructor, destructor, or type conversion before '(' token
delay(100);
^
/Users/Louis/Documents/Arduino/siren/Ambulance.ino:159:1: error: expected unqualified-id before '{' token
{
^
exit status 1
Error compiling for board Arduino/Genuino Uno.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.