How to keep something on until?

How do I keep a pin on until a certain temperature is reached

if (f>70) digitalWrite(pin10,ON)

//how do I do this Keep On until f=68

Do you mean how can you make something happen while something else is true? Like how can I keep the pin on while f != 68?

But really you’re doing yourself a huge disservice here. You’re getting the answer to the question you asked, but not the answer you really need. Do yourself a favor and read this and this and come back with something a little better and you’ll probably get something that actually works for what you want it to work for.

No how to keep pin, on until something is true

SEBA11: No how to keep pin, on until something is true

Sorry. But there's not an until command. You can keep the pin on while something is false though. I want you to think real hard about that for a second. You see it yet?

Delta_G: But really you're doing yourself a huge disservice here. You're getting the answer to the question you asked, but not the answer you really need. Do yourself a favor and read this and this and come back with something a little better and you'll probably get something that actually works for what you want it to work for.

I'm quoting this again because I think I can see what you want to make and you're going about it the wrong way by looking for blocking code. But if you're not going to bother to heed my advice then I will certainly help you fall right into this hole.

SEBA11: No how to keep pin, on until something is true

Turn it on with digitalWrite(pin, HIGH);

Then regularly check the something using something like value = digitalRead(somethingPin);

When the something is true, turn it off using something like

if (value == true) {
   digitalWrite(pin, LOW);
}

...R

Just to be clear, when you set a pin high you don't have to do anything special to "keep" it high. It stays that way until you do something else to change it.

Steve

Delta_G I wish you were able to comment on my stepper issue I like the way you push people to look for the answers with just enough help to make it interesting. My 1st experience on this forum was to come across rude idiots, I`m so please that not all responders are like that.

Tezzatron: Delta_G I wish you were able to comment on my stepper issue I like the way you push people to look for the answers with just enough help to make it interesting. My 1st experience on this forum was to come across rude idiots, I`m so please that not all responders are like that.

How is this helpful to @SEBA11 who started this Thread. Don't hijack other people's Threads.

And how are we supposed to know where to find the Thread with your stepper issue?

...R