So this is probably a super simple thing that im missing, however I cant work it out.
I purchased a few KB2040 to play around with.
I followed the CircuitPython guide for that board to get up and going (and even tried downloading their code packages), however no matter what example I use, if it references a pin, I get the following error
AttributeError: 'module' object has no attribute 'whateverpin'
Things like board.NEOPIXEL and board.D1 give the error, but board.LED and board.A1 seem to work
I have tried both circuitpython 7.3.3 and 8.0.4 and I have confirmed the pin names for codepython for this board are correct.
Any help would be appreciated
KB2040 wont work with any board.* examples
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- alpierce
- Posts: 206
- Joined: Mon May 13, 2013 2:44 am
Re: KB2040 wont work with any board.* examples
Which circuitpython .uf2 file did you load ? It sounds like the board description is wrong. If you go into the REPL what does the description say? If you type
load board
dir(board)
What pins show up?
load board
dir(board)
What pins show up?
- tristanH
- Posts: 2
- Joined: Fri Mar 17, 2023 10:21 pm
Re: KB2040 wont work with any board.* examples
Sorry for the slow response, ended up in hospital after i posted that haha.
You were spot on, i was using the incorrect .uf2 file even though i downloaded the one for the board from the tutorial, but after going direct to circuitpython and downloading the correct one, things are working much better.
Thanks for your help
- alpierce
- Posts: 206
- Joined: Mon May 13, 2013 2:44 am
Re: KB2040 wont work with any board.* examples
Glad to hear it’s working and that you’re ok. In my post I should have written
import board
dir(board)
To get the pins list
Happy hacking
import board
dir(board)
To get the pins list
Happy hacking
Please be positive and constructive with your questions and comments.