Jack Purdum
Using: ?? pinMode(pin, INPUT_PULLUP); is functionally equivalent to: ?? pinMode(pin, INPUT); ?? digitalWrite(pin, HIGH); The first version puts it in a known state just as the second two statements do. I think I checked the list file for the statements a long time ago and both generated the same code as I recall, so nothing is gained in terms of resource use from one over the other. Jack, W8TEE
On Sunday, May 20, 2018, 2:27:03 PM EDT, Arv Evans <arvid.evans@...> wrote:
Allison, and others... I have not taken time to look at the software, but a question keeps nagging me that this may be a software problem.? The "pinMode()" command has an option for turning on the internal PULLUP resistor, or not doing that.? What might be the effect of not turning on the PULLUP option for the encoder push-switch, or for one or both of the encoder phase signals?? pinMode(); pinMode(pin, mode); pinMode(pin, INPUT); pinMode(pin, OUTPUT); pinMode(pin, INPUT_PULLUP); or digitalWrite(pin, HIGH); digitalWrite(pin, LOW); If using interrupts to read the rotary encoder it may be possible that the direction LOW-to-HIGH or HIGH-to-LOW was not set properly relative to any pinMode() command. With that in mind I may have to download the source code and take an in-depth look at what might be happening there. Arv _._ On Sun, May 20, 2018 at 11:50 AM, ajparent1/KB1GMX <kb1gmx@...> wrote: Jerry, there was no wire to flail around brush the board only has the 12V input |