my idea was to use the if cause i must inluce the hall
You must what?
so this seem better for me:
Lets see. We'll substitute the values that are known for the variables:
if (reading == HIGH && previous == LOW && millis() - time > debounce) {
{
analogWrite(9,64);
}
if (9 == 64 && 10 == 0)
{
analogWrite(9,128);
}
if (9 == 128 && 10 == 0)
{
analogWrite(9,254);
}
if (9 == 254 && 10 == 0)
{
analogWrite(9,0);
analogWrite(10,255);
}
Now, does that make sense?