SPI transfer with BMA222 accelerometer

You need to read up on how to use SPI, e.g. start here: SPI - Arduino Reference

Not sure what this is supposed to do: Does it even compile?

SerialUSB.println("Temp:"+c);