Editing Circuitpython
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 34: | Line 34: | ||
To write your program, open code.py and edit it with your code. Once you safe it, it will be automatically excuted. The file name must be code.py or main.py. | To write your program, open code.py and edit it with your code. Once you safe it, it will be automatically excuted. The file name must be code.py or main.py. | ||
− | Try it out with the following program | + | Try it out with the following program: |
<syntaxhighlight lang="python" line='line'> | <syntaxhighlight lang="python" line='line'> | ||
Line 44: | Line 44: | ||
led = digitalio.DigitalInOut(board.LED) | led = digitalio.DigitalInOut(board.LED) | ||
led.direction = digitalio.Direction.OUTPUT | led.direction = digitalio.Direction.OUTPUT | ||
+ | |||
+ | print("Hello World!") | ||
+ | i=0 | ||
while True: | while True: | ||
+ | i = i + 1 | ||
+ | print(i) | ||
led.value = False | led.value = False | ||
time.sleep(0.8) | time.sleep(0.8) |