changes to enable interrups and spi communication