I would like to create a compile error so sketch does not upload in certain cases.
I have written a library with a function that adds pins being used to an array. If the same pin is used twice I want to fail the compilation (preferably with an error that explains why). Is this possible?
void CheckPinNum(int newPinNum){
for (int i=0; i <= PinArrayLength; i++){
if (newPinNum == PinArray[i])
failCompilation("You entered same pin twice!");
}
}