//when the cs pin is low then spi sensor is active
//when the cs pin is high then spi is inactive
#include <SPI.h>
#define CS 10
void setup() {
// put your setup code here, to run once:
char buffer[]="HELLO!";
Serial.begin(115200);
pinMode(CS,OUTPUT);
digitalWrite(CS, LOW);
SPI.begin();
SPI.transfer(buffer,strlen(buffer));
SPI.end();
digitalWrite(CS,HIGH);
Serial.print("DATA RECEIVED!!");
Serial.println(buffer) ;
}
void loop() {
// put your main code here, to run repeatedly:
}