fix bug with multiple SPI commands

add ring buffer on atmega