I new to C and I'm attempting to writte a simple code for Arduino (based on Wiring language) like this:
void loop()
{
distance(cm);
delay(200);
}
void distance(char[3] unit)
{
if (unit[] == "cm")
Serial.println("cm");
}
Could somebody please advise me how to writte it correctly? Thanks in advance!