Thanks guys, but I learned the !! from Charles Leo (my boss).
It's great to be in the offices of melabs.
Mike,
Yup, that's the correct way to "invert the logic of the comparison, use a single !, which gives you a non-inverted result.".
And while it does look strange, the (x) in GPIO.0(x) is the offset from GPIO.0.
If x = 0 then it uses GPIO.0
If x = 2, it uses GPIO.2
You can start from any bit.
With GPIO.2(x)
If x = 0 then it uses GPIO.2
If x = 2, it uses GPIO.4
This notation can only be used in direct assignments (using = sign).
You cannot use it as PIN designators in PBP commands like SERIN/OUT, HIGH/LOW etc.





Bookmarks