added define for testing without hardware.  fixed loops, sending fewer bytes