print("Hello World")
import time
import board
import digitalio
# Set up pin 20 as an output
pin20 = digitalio.DigitalInOut(board.GP20)
pin20.direction = digitalio.Direction.OUTPUT
# Set up pin 19 as an output
pin19 = digitalio.DigitalInOut(board.GP19)
pin19.direction = digitalio.Direction.OUTPUT
# Blink the pins in a loop
while True:
delay =0.1
delay =3
# Turn both pins on
pin20.value = True
pin19.value = True
time.sleep(delay) # Wait for 0.5 seconds
# Turn both pins off
pin20.value = False
pin19.value = False
time.sleep(delay) # Wait for 0.5 seconds
If you don't have access to your own computer and can't install the following software:
then you can edit code directly from a website.
Nowadays, Chrome-based browsers have built-in capabilities to connect to USB devices and drives with specific permissions.
By visiting this website, you can edit code on someone else's PC: https://code.circuitpython.org/
Try it