there is no main void loop in your prog, you did good with setup but main a continous loop is required also.
its a loop that always goes on keeps running.
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}