TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: ALISTER
from: JULIUS KAVAY
date: 2018-02-20 22:39:00
subject: Re: How to use while loop

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)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.