Well this would be the code, unfortunately I'm just watching videos ... I do not have a raspberry, where I live so cheap they are not ... what confuses me here is the conditional While, it says while it's true ... in In any case, when I see that the code is executed, the led is turned on and off every so often and I do not understand why, if it gives a false value, when it ends the while, it should not be executed again or if ... leaves the control structure and in my opinion only once should it turn on and off and nothing else ...
import RPi.GPIO
import time
RPi.GPIO.setmode(RPi.GPIO.BCM)
RPi.GPIO.setup(2,RPi.GPIO.OUT)
While true:
RPi.GPIO.output(2, True)
time.sleep(1)
RPi.GPIO.output(2, False)
time.sleep(1)
In this case, I see that he uses the Putty program, and not directly from the Raspbian that does it, I still do not know very well about this, but the next semester I will take this and I have to see it, since it will be in groups and economically I can not contribute much to this, so sorry if I miss very obvious mistakes, but for now is the only way I have to learn and your help on this page, thanks in advance to all.