 int pushButton = 2;
-int switchLed = 13;
 int mainLed = 6;
 
 int switchState = 1;
+int noSerialCount = 0;
 
 #define ON 49	// 1
 #define OFF 48	// 0

			digitalWrite(mainLed, 0);
		}

		// check for button press
		int sensorRead = digitalRead(pushButton);

		if(switchState != sensorRead) {
			switchState = sensorRead;

			// send on serial when switch pushed
			if(sensorRead == 0) {
				Serial.println(serialRead);
			}
		}

		// write the inverted switch value to the LED
		digitalWrite(switchLed, !sensorRead);

		// introduce a sensible delay
		delay(100);
	}
}

	// turn on pullup resistor
	digitalWrite(pushButton, HIGH);

	// output port for LED
	pinMode(mainLed, OUTPUT); 
}

void loop(){
	int serialRead = -1;

	if (Serial.available() > 0) {
		// read over serial port
		serialRead = Serial.read();

		// set LED on/off from serial
		if(serialRead == ON) {
