Post
by adouglas » Sun May 02, 2021 12:03 am
Thanks, Robert,, much appreciated.
I checked just now with the PULL_DOWN instead of PULL_NONE. It was dumb of me to use PULL_NONE. in the irq thing. I tried to change it, but I could not figure out how to clear the interrupt, and ran out of time. It gives an exception the second time the script is run because the interrupt is already specified.
Anyway, as you say it exhibits the same behaviour. This to me looks like a bug in the pyboard design. The pullups should be such that you can specify pullup or pull down? The behaviour of the system is not going as you would expect based on what is specified in the program. This sort of thing makes learning exponentially harder, and also in my application I simply have no way to actually get a pulldown situation, except building in external resistors. I don't know, but I would think pull down was common and a logical way of doing things.
I don't know where you got this knowledge from, but imo it is a serious inadequacy in the documentation. I could never have known that if you hadn't said so, unless I had read through and thought about the whole datasheet for the ARM chip.
As for using the pin to turn an led on and off, this works now, inexplicably. I cut and pasted my own code, and now it works as would be expected based on your explanation of the pullups/pull downs. But it still looks like a bug to me. I specified pull down, not pull up.