This is the error message i keep getting when i try to compile
Arduino: 1.6.8 (Windows XP), Board: "Arduino/Genuino Uno"
C:\DOCUME~1\TAYLOR~1\LOCALS~1\Temp\build99571413ea8aeecab8c7a160a08e1ec4.tmp/core\core.a(main.cpp.o): In function `main':
C:\Documents and Settings\Taylor Miller\My Documents\Downloads\arduino-1.6.8-windows\arduino-1.6.8\hardware\arduino\avr\cores\arduino/main.cpp:46: undefined reference to `loop'
collect2.exe: error: ld returned 1 exit status
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.
int forward = 13; // Pin 12 - Forward
int reverse = 12; // Pin 11 - Reverse
int left = 8; // Pin 10 - Left
int right = 7; // Pin 9 - Right
char val; // Variable to receive data from the serial port
void setup() {
// initialize the digital pins as output
pinMode(forward, OUTPUT);
pinMode(reverse, OUTPUT);
pinMode(left, OUTPUT);
pinMode(right, OUTPUT); Serial.begin(9600); // Start serial communication at 9600bps
}
// Fordward action
void go_forward() {
digitalWrite(forward, HIGH);
digitalWrite(reverse, LOW);
}
// Reverse action
void go_reverse() {
digitalWrite(reverse, HIGH);
digitalWrite(forward, LOW);
}
// Left action
void go_left() {
digitalWrite(left, HIGH);
digitalWrite(right, LOW);
}
// Right action
void go_right() {
digitalWrite(right, HIGH);
digitalWrite(left, LOW);
}
// Stop turn action
void stop_turn() {
digitalWrite(right, LOW);
digitalWrite(left, LOW);
}
// Stop car
void stop_car() {
digitalWrite(forward, LOW);
digitalWrite(reverse, LOW);
digitalWrite(right, LOW);
digitalWrite(left, LOW);
}
// Read serial port and perform command
void performCommand() {
if (Serial.available()) {
val = Serial.read();
} else if (val == 'w') { // Forward go_forward(); }
} else if (val == 's') { // Backward go_reverse(); }
} else if (val == 'd') { // Right go_right(); }
} else if (val == 'a') { // Left go_left(); }
} else if (val == 'l') { // Stop Turn stop_turn(); }
} else if (val == 'k') { // Stop stop_car(); }
}
{
void loop();
performCommand();
}
}