 
 int isCoilValid(int coilNo)
 {
-	for(int i = 0; i < NUMCOILS; i++){
+	for(int i = 1; i <= NUMCOILS; i++){
 		if(i == coilNo){
-			return i + 1; // Add +1 to prevent false return
+			return i ; // Add +1 to prevent false return
 		}
 	}
 	return false;

}





void sendFreq(float freq, int pinNo)


void sendAllFreqs()
{
	// Send each frequency 3 times to ensure SPI works
    for (int i = 0; i < NUMCOILS; i++)
    {
    	for (int j = 0; j < 3; j++){
