I am getting the error message invalid operands of types 'void' and 'const char [2]' to binary 'operator=='.
This is my code:
#include <SPI.h>
int slave_select = 11;
int message;
void setup() {
// put your setup code here, to run once:
pinMode(slave_select, OUTPUT);
SPI.beginTransaction(SPISettings(14000000, MSBFIRST, SPI_MODE0));
startTheSPI();
}
void loop() {
// put your main code here, to run repeatedly:
}
int startTheSPI() {
int i;
while (i >2) {
if (SPI.transfer(slave_select, "h") == "i") { //this line is the error
i = i + 1;
}
}
void ending() {
SPI.endTransaction();
}