Lost board and digitalio files
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- pridgenr
- Posts: 3
- Joined: Fri Mar 17, 2023 8:32 am
Lost board and digitalio files
I have just started working with Circuit Playground Express, and seem to have accidentally deleted my board and digitalio files, resulting in errors. Where do I find replacements to download?
- dastels
- Posts: 12805
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Lost board and digitalio files
There are no board and digitalio files, those modules are part of the CircuitPython runtime.
What errors are you getting?
Dave
What errors are you getting?
Dave
- pridgenr
- Posts: 3
- Joined: Fri Mar 17, 2023 8:32 am
Re: Lost board and digitalio files
import board
import digitalio
import time
led = digitalio.DigitalInOut(board.LED)
led.direction = digitalio.Direction.OUTPUT
while True:
led.value = True
time.sleep(1)
led.value = False
time.sleep(2)
When using VSCode to copy the blink sample code from the webpage, I get the message. "Import "board" could not be resolved". Is this just a quirk of CircuitPython on VSCode?
import digitalio
import time
led = digitalio.DigitalInOut(board.LED)
led.direction = digitalio.Direction.OUTPUT
while True:
led.value = True
time.sleep(1)
led.value = False
time.sleep(2)
When using VSCode to copy the blink sample code from the webpage, I get the message. "Import "board" could not be resolved". Is this just a quirk of CircuitPython on VSCode?
- dastels
- Posts: 12805
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Lost board and digitalio files
Are you sure you're running the code on a CircuitPython device, or something with Blinka?
Dave
Dave
- pridgenr
- Posts: 3
- Joined: Fri Mar 17, 2023 8:32 am
Re: Lost board and digitalio files
Its a Circuit Playground Express running version 8.something. It shows in File Manager as F:CIRCUITPY. This program runs, and can be tweaked to change the blink rate. However, I'm puzzled why it has imports like board and digitalio if they're not needed. I wanted to be sure I hadn't deleted something by mistake and messed things up.
- dastels
- Posts: 12805
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Lost board and digitalio files
They are needed in the code you posted.
So it sounds like VSCode is complaining about the board module. Which makes sense since there's nothing for it to find/resolve.
This might help: https://marketplace.visualstudio.com/it ... cuitpython
Dave
So it sounds like VSCode is complaining about the board module. Which makes sense since there's nothing for it to find/resolve.
This might help: https://marketplace.visualstudio.com/it ... cuitpython
Dave
Please be positive and constructive with your questions and comments.