hi all, I have no problems when entering a constant into the argument of a delay function. but when I enter a variable I can't get any result at all. Here is an example of what I mean.
digitalWrite(11, HIGH);
delayMicroseconds(15);
digitalWrite(11, LOW);
delayMicroseconds(25);
Now if I put a variable in place of the 15 and 25 I just get mv voltage at pin11. The above program gives a pseudo analog voltage. To get a different voltage all you have to do is change the constants. But it is not working for a variable in place of the constants Why?
I am using the arduino nano board.
digitalWrite(11, HIGH);
delayMicroseconds(15);
digitalWrite(11, LOW);
delayMicroseconds(25);
Now if I put a variable in place of the 15 and 25 I just get mv voltage at pin11. The above program gives a pseudo analog voltage. To get a different voltage all you have to do is change the constants. But it is not working for a variable in place of the constants Why?
I am using the arduino nano board.
Last edited: