When i try to blink with a LED inside a while/for- loop it just don't works.
I can see om my computer screen that GPIO17 goes from True to FALSE and back again. But the LED in reality are contstant ON or contstant OFF. Depending which start value that GPIO17 start with.
But if a make a simple program and sign True to GPIO17 and then the program is finished, the LED is ON.
Why???
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
if you make the LED blink inside the while loop, the output will not be refreshed untill the loop is done.
So only the last state will be applied to the output. The output will always be ON or OFF.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
yannickasselin1 hat geschrieben:
Just like Edwin said,
if you make the LED blink inside the while loop, the output will not be refreshed untill the loop is done.
So only the last state will be applied to the output. The output will always be ON or OFF.
Okej. I understand now that program need to be finished until all values can be set to the output.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello.
When i try to blink with a LED inside a while/for- loop it just don't works.
I can see om my computer screen that GPIO17 goes from True to FALSE and back again. But the LED in reality are contstant ON or contstant OFF. Depending which start value that GPIO17 start with.
But if a make a simple program and sign True to GPIO17 and then the program is finished, the LED is ON.
Why???
hi,
this is one of the basics of I guess all plc's
BR
Edwin
That is what im trying to do.
Create a while loop who blink a LED and you see that it won't works.
Just like Edwin said,
if you make the LED blink inside the while loop, the output will not be refreshed untill the loop is done.
So only the last state will be applied to the output. The output will always be ON or OFF.
Okej. I understand now that program need to be finished until all values can be set to the output.