I've been running a project on the Pimoroni Tiny 2040 using the Pico CircuitPython 7.1 release with the only issue that I can't control GP29.
Then I spotted CircuitPython 7.1.1 specifically for the Tiny 2040. I assumed this would bring GP29 into play.
First I needed to edit circuitpython.py and add the Tiny 2040 to the 'valid Boards' list, the two recommended solutions I found failed, but I invented something that did, (0x16d0, 0x08c7), # Tiny2040. So now the Mu editor recognizes the Tiny 2040. Phew...
GP29 is now accessible as expected.
BUT access to GP16, GP18, GP19 & GP20 has been lost. So I cant control the LED.
Can someone recommend a fix or fix this please.
circuitpython Pimoroni tiny 2040 lost LED control
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- theboatbuilder59
- Posts: 7
- Joined: Sat Feb 01, 2020 6:43 pm
- tannewt
- Posts: 3304
- Joined: Thu Oct 06, 2016 8:48 pm
Re: circuitpython Pimoroni tiny 2040 lost LED control
Make sure you are using the latest Mu beta. It should detect CircuitPython without USB VID/PID now.
I'm not sure what is connected to GP16. The other LED lines are available in board as LED_R, LED_G and LED_B.
You can see the full list by doing `dir(board)` in the REPL or viewing the source here: https://github.com/adafruit/circuitpyth ... 040/pins.c
I'm not sure what is connected to GP16. The other LED lines are available in board as LED_R, LED_G and LED_B.
You can see the full list by doing `dir(board)` in the REPL or viewing the source here: https://github.com/adafruit/circuitpyth ... 040/pins.c
- danhalbert
- Posts: 4649
- Joined: Tue Aug 08, 2017 12:37 pm
Re: circuitpython Pimoroni tiny 2040 lost LED control
The LED pins have names corresponding to their function: board.LED_R, LED_G, LED_B.
As far as I can tell, GP16 is not connected to anything, so there is no name for it.
You can use the original, raw pin, names with `microcontroller.pin`.
You can find out the names available by doing `dir(board)`, and `dir(microcontroller.pin)`. You will need to `import microcontroller.pin`.
As far as I can tell, GP16 is not connected to anything, so there is no name for it.
You can use the original, raw pin, names with `microcontroller.pin`.
You can find out the names available by doing `dir(board)`, and `dir(microcontroller.pin)`. You will need to `import microcontroller.pin`.
- theboatbuilder59
- Posts: 7
- Joined: Sat Feb 01, 2020 6:43 pm
Re: circuitpython Pimoroni tiny 2040 lost LED control
Many thanks for the prompt replies.
I am running Mu 1.1.0 alpha.2
Apologies for including GP16 this was a typo which I though I had corrected.
I will try these solutions shortly and post details.
I am running Mu 1.1.0 alpha.2
Apologies for including GP16 this was a typo which I though I had corrected.
I will try these solutions shortly and post details.
- theboatbuilder59
- Posts: 7
- Joined: Sat Feb 01, 2020 6:43 pm
Re: circuitpython Pimoroni tiny 2040 lost LED control
Update.
In REPL
import board
dir(board)
gives
['__class__', '__name__', 'A0', 'A1', 'A2', 'A3', 'GP0', 'GP1', 'GP2', 'GP26', 'GP26_A0', 'GP27', 'GP27_A1', 'GP28', 'GP28_A2', 'GP29', 'GP29_A3', 'GP3', 'GP4', 'GP5', 'GP6', 'GP7', 'LED_B', 'LED_G', 'LED_R', 'USER_SW', 'board_id']
My confusion comes from the Pimoroni pinout which refers to the LED pins as GP18, GP19, GP20
Replacing GP18, GP19, GP20 with LED_R, LED_G, LED_B fixes my problem.
I will upgrade Mu shorty.
Many thanks again for your help.
In REPL
import board
dir(board)
gives
['__class__', '__name__', 'A0', 'A1', 'A2', 'A3', 'GP0', 'GP1', 'GP2', 'GP26', 'GP26_A0', 'GP27', 'GP27_A1', 'GP28', 'GP28_A2', 'GP29', 'GP29_A3', 'GP3', 'GP4', 'GP5', 'GP6', 'GP7', 'LED_B', 'LED_G', 'LED_R', 'USER_SW', 'board_id']
My confusion comes from the Pimoroni pinout which refers to the LED pins as GP18, GP19, GP20
Replacing GP18, GP19, GP20 with LED_R, LED_G, LED_B fixes my problem.
I will upgrade Mu shorty.
Many thanks again for your help.
Please be positive and constructive with your questions and comments.