I am very new to micro controller programming, the C language. I've been reading everything I can, but I cannot find a direct answer to a very simple question.
If you program a delay inside a specific function that is within the void loop function will it delay all processing in the entire loop function, or just the specific function that it is contained in?
for example: a simple temperature reading
void loop()
{
{
tempC = analogRead(tempPin); //read the value from the sensor
tempC = (5.0 * tempC * 100.0)/1024.0; //convert the analog data to temperature
Serial.print((byte)tempC); //send the data to the computer
delay(1000); //wait one second before sending new data
}
{analogWrite(LED, 200) //pwm an led
}
}
will the delay within the temperature function affect the LED?