Pin change status

Hi There! I am using this sketch to read the pin change status on 13th pin on UNO and fire the serial message only when there is a change. I believe the better way is to use the interrupts. I have gone through some examples, but most of the examples talks about the pin changes on pins 2 and 3 (Interrupts 0 & 1). I am new to interrupts. Not sure if this sketch can be achieved through interrupts? if some one can shed some light and provide an example with interrupts that would be great. I want to read the pin status of pin 13th and send a serial msg when there is a change in status.

Thanks in Advance

boolean statusCheck=false; 
#include <SoftwareSerial.h>

void setup()

void loop()
   if((digitalRead(13)==HIGH) && (statusCheck==false))
     statusCheck = true;
     Serial.println("LED is ON");  

  if((digitalRead(13)==LOW) && (statusCheck == true))

 Serial.println("LED is OFF");
 statusCheck = false; 

I believe the better way is to use the interrupts.

Why? Why is it necessary to know, nanoseconds after the pin changes state, that that has happened, so that you can sssslllloooowwwwllllyyyy send serial data?

So pin 13 is LOW and statusCheck is false so nothing happens.

You are not using interrupts.


Not using Software Serial, why include it?
If something external will be driving pin 13, you can use PCINTs to create an interrupt for it.