Saturday, August 30, 2014

The Genius of Jake Beningo

Phew, the guy gets paid to teach this stuff :

if State == 0:
          GPIO.output( GREEN_LED, False)
          State = 1
else :
          GPIO.output( GREEN_LED, True)
          State = 0

within a while loop. Yuck.

He made State an integer. Dude, why?

Here's the right way :

GPIO.output( GREEN_LED, State )
State = not State

No comments:

Post a Comment