BACKUP: Working code before SPI implementation
Added functionality of SPI protocol data transfer