added interrupt, fixed digitalread of rxpin