# Pimoroni rgb base not working

**URL:** <https://forums.pimoroni.com/t/pimoroni-rgb-base-not-working/21874>\
**Category:** Support\
**Created:** [April 3, 2023, 4:59pm UTC](https://forums.pimoroni.com/t/pimoroni-rgb-base-not-working/21874 "2023-04-03T16:59:49Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![masluk](https://avatars.discourse-cdn.com/v4/letter/m/48db29/32.png) [@masluk](https://forums.pimoroni.com/u/masluk)\
**Post date:** [April 3, 2023, 4:59pm UTC](https://forums.pimoroni.com/t/pimoroni-rgb-base-not-working/21874/1 "2023-04-03T16:59:49Z")

</div>

Hallo!  
I recived my Pimoroni rgb base today / with pico), and I cannot get it to work.  
I have contact with pico through Tonny ( i,e, I cant print (“Hello world”)-  
I followed intructions which files and lib´s I should download but nothing works, Nothing happens when I press the buttons,No lights , nothing!  
I tried different example-files but always get errors from Tonny.  
I tried both [PMK CircuitPython library](https://github.com/pimoroni/pmk-circuitpython)! and [custom MicroPython uf2](https://github.com/pimoroni/pimoroni-pico/releases/latest/).  
Any ideas where I shall start???  
Any help is appriciated.  
Mike

---

<div class="post-metadata">

**Author:** ![Nox](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/nox/32/9205_2.png) [@Nox](https://forums.pimoroni.com/u/Nox)\
**Post date:** [April 3, 2023, 10:42pm UTC](https://forums.pimoroni.com/t/pimoroni-rgb-base-not-working/21874/2 "2023-04-03T22:42:53Z")

</div>

You’ll wan’t the CircuitPython utf found [here](https://circuitpython.org/board/raspberry_pi_pico/) for working with the PMK library, rather than the microPython utf you have linked above

> **Condensed instructions with links and tips below**
>
> you’ll also want the following adafruit libraries  
> **adafruit\_dotsar.py** from [here](https://github.com/adafruit/Adafruit_CircuitPython_DotStar) (controls lighting)  
> **adafruit\_hid** folder from [here](https://github.com/adafruit/Adafruit_CircuitPython_HID) (for sending macro keystrokes)  
> **adafruit\_midi** folder from [here](https://github.com/adafruit/Adafruit_CircuitPython_MIDI) (for controlling midi)  
> all of those and the PMK library (including the examples) go in the /lib folder on the drive labeled CIRCUITPY (your pico RGB Keypad base when connected). copy any PMK example file to the top level of the drive,
> 
> **!!IMPORTANT!!**  
> Edit the copy to comment out imports for Keybow2040, and remove comment markers for Pico RGB Keypad Base. the defaults are for the keybow  
> **!!IMPORTANT!!**
> 
> then rename it **code.py** it should automatically load. (may require a reconnect)
> 
> NOTE:  
> you can find pre-made machinepy versions of the adafruit libraries [here](https://circuitpython.org/libraries) (they’re smaller/faster but not human readable) make sure you get the bundle that matches your circuit python version. also if you have both the .py and .mpy versions on your pico, the .py will be used, so make sure to use only the ones you need and delete the others from your pico.

---

<div class="post-metadata">

**Author:** ![masluk](https://avatars.discourse-cdn.com/v4/letter/m/48db29/32.png) [@masluk](https://forums.pimoroni.com/u/masluk)\
**Post date:** [April 4, 2023, 7:42am UTC](https://forums.pimoroni.com/t/pimoroni-rgb-base-not-working/21874/3 "2023-04-04T07:42:58Z")

</div>

Hallo Nox! Thanx for your help.  
I installed the adafruit libraries as you suggested.  
There is no mention of of Keybox2040 or Pico RBG in the code.py file .  
There is no examples in the PMK library.

Trying to run example : dotstar\_simpletest.py , I get this error in thonny:

\*\*\*\*\*# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries

# SPDX-License-Identifier: MIT

import time  
import random  
import board  
import adafruit\_dotstar as dotstar

# On-board DotStar for boards including Gemma, Trinket, and ItsyBitsy

dots = dotstar.DotStar(board.APA102\_SCK, board.APA102\_MOSI, 1, brightness=0.2)

# Using a DotStar Digital LED Strip with 30 LEDs connected to hardware SPI

# dots = dotstar.DotStar(board.SCK, board.MOSI, 30, brightness=0.2)

# Using a DotStar Digital LED Strip with 30 LEDs connected to digital pins

# dots = dotstar.DotStar(board.D6, board.D5, 30, brightness=0.2)

# HELPERS

# a random color 0 → 192

def random\_color():  
return random.randrange(0, 7) \* 32

# MAIN LOOP

n\_dots = len(dots)  
while True:  
# Fill each dot with a random color  
for dot in range(n\_dots):  
dots[dot] = (random\_color(), random\_color(), random\_color())

```
time.sleep(0.25)

```

Traceback (most recent call last):  
File “”, line 7, in   
ImportError: no module named ‘adafruit\_dotstar’\*\*\*\*\*

Where do I go from here?  
Mike

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [April 4, 2023, 9:18am UTC](https://forums.pimoroni.com/t/pimoroni-rgb-base-not-working/21874/4 "2023-04-04T09:18:15Z")

</div>

If you flash it with the Custom Pimoroni uf2 the Pimoroni demo should work, it did for me. I haven’t tried the 1.19.18 release just yet though.  
[Release Version 1.19.18 · pimoroni/pimoroni-pico (github.com)](https://github.com/pimoroni/pimoroni-pico/releases/tag/v1.19.18)

I went with Circuit Python and PMK. I followed this guide.  
[pimoroni/pmk-circuitpython (github.com)](https://github.com/pimoroni/pmk-circuitpython)

Make sure Thonny’s interpreter is set to the correct setting in the lower right hand corner.

---

<div class="post-metadata">

**Author:** ![masluk](https://avatars.discourse-cdn.com/v4/letter/m/48db29/32.png) [@masluk](https://forums.pimoroni.com/u/masluk)\
**Post date:** [April 4, 2023, 12:45pm UTC](https://forums.pimoroni.com/t/pimoroni-rgb-base-not-working/21874/5 "2023-04-04T12:45:31Z")

</div>

thanx for help!

I give up,  
Error ,error ,error module not found , error no such module , whatever I do.  
Thanx anyway for help.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [April 4, 2023, 12:59pm UTC](https://forums.pimoroni.com/t/pimoroni-rgb-base-not-working/21874/6 "2023-04-04T12:59:34Z")

</div>

Did you drop the `adafruit_dotstar.py` file into the `lib` folder on your `CIRCUITPY` drive?

---

<div class="post-metadata">

**Author:** ![masluk](https://avatars.discourse-cdn.com/v4/letter/m/48db29/32.png) [@masluk](https://forums.pimoroni.com/u/masluk)\
**Post date:** [April 4, 2023, 4:50pm UTC](https://forums.pimoroni.com/t/pimoroni-rgb-base-not-working/21874/7 "2023-04-04T16:50:20Z")

</div>

Hi!  
\*\* Did you drop the `adafruit_dotstar.py` file into the `lib` folder on your `CIRCUITPY` drive?  
Yes, no change. I will try again tomorrow!

---

<div class="post-metadata">

**Author:** ![Nox](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/nox/32/9205_2.png) [@Nox](https://forums.pimoroni.com/u/Nox)\
**Post date:** [April 4, 2023, 6:16pm UTC](https://forums.pimoroni.com/t/pimoroni-rgb-base-not-working/21874/8 "2023-04-04T18:16:50Z")

</div>

the PMK examples are in a separate folder in in the first link you posted. each example file includes 2 lines that look like:

```auto
from pmk.platform.keybow2040 import Keybow2040 as Hardware # for Keybow 2040
# from pmk.platform.rgbkeypadbase import RGBKeypadBase as Hardware # for Pico RGB Keypad Base

```

and need to be changed to

```auto
# from pmk.platform.keybow2040 import Keybow2040 as Hardware # for Keybow 2040
from pmk.platform.rgbkeypadbase import RGBKeypadBase as Hardware # for Pico RGB Keypad Base

```

to work for the Pico RGB Keypad Base

example files should always be copied to the top of the folder structure of the device they run on when you try them out, if you run them from a subfolder they may have problems finding the libraries you need (by default python will not look in the folders above it, only below)

ETA:  
the easiest way to run examples is (after editing them) replace the code.py file with them, by deleting the old code.py file, copying the example file to where the code.py file was, and renaming the example file code.py

---

<div class="post-metadata">

**Author:** ![masluk](https://avatars.discourse-cdn.com/v4/letter/m/48db29/32.png) [@masluk](https://forums.pimoroni.com/u/masluk)\
**Post date:** [April 5, 2023, 6:37am UTC](https://forums.pimoroni.com/t/pimoroni-rgb-base-not-working/21874/9 "2023-04-05T06:37:48Z")

</div>

HI! Thank you nox! Got it to work efter dabling with folders and subfolders.  
I´m learning something new every day…  
Mike

---

<div class="post-metadata">

**Author:** ![Nox](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/nox/32/9205_2.png) [@Nox](https://forums.pimoroni.com/u/Nox)\
**Post date:** [April 6, 2023, 1:09am UTC](https://forums.pimoroni.com/t/pimoroni-rgb-base-not-working/21874/10 "2023-04-06T01:09:28Z")

</div>

glad to hear you got it sorted. The first few projects with microcontroller electronics can be confusing and frustrating, but once you’re past that there’s so many things to play around with.
