On 20.02.2018 20:57, alister wrote:
>>
>> newState = readPin()
>> if lastState != newState:
>> if newState == opened:
>> print "Opened"
>> else:
>> print "Closed"
>> newState = lastState
________^^^^^^^^^^^^^^^^^^^
>
> I think you may have reversed newState& lastState
definitive.
The problem with computers is, that they always do what we tell them
and not that, what we want (origin unknown).
Regards,
Julius
--
I think, an old Windows has old bugs,
a new Windows has new bugs and
other operating systems have other bugs.
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|