# Some RP2040 examples are not working on Tiny2040

**URL:** <https://forums.pimoroni.com/t/some-rp2040-examples-are-not-working-on-tiny2040/22925>\
**Category:** Support\
**Created:** [September 12, 2023, 5:08pm UTC](https://forums.pimoroni.com/t/some-rp2040-examples-are-not-working-on-tiny2040/22925 "2023-09-12T17:08:57Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![dan23](https://avatars.discourse-cdn.com/v4/letter/d/a3d4f5/32.png) [@dan23](https://forums.pimoroni.com/u/dan23)\
**Post date:** [September 12, 2023, 5:08pm UTC](https://forums.pimoroni.com/t/some-rp2040-examples-are-not-working-on-tiny2040/22925/1 "2023-09-12T17:08:58Z")

</div>

Hi all, I am trying to run some of the examples for RP2040 found here:

> **[GitHub - raspberrypi/pico-examples](https://github.com/raspberrypi/pico-examples)**
>
> Contribute to raspberrypi/pico-examples development by creating an account on GitHub.

and here

> **[GitHub - sekigon-gonnoc/Pico-PIO-USB: USB host/device implementation using...](https://github.com/sekigon-gonnoc/Pico-PIO-USB)**
>
> USB host/device implementation using PIO of raspberry pi pico (RP2040). - GitHub - sekigon-gonnoc/Pico-PIO-USB: USB host/device implementation using PIO of raspberry pi pico (RP2040).

to turn Tiny2040 into an usb-host but without any luck. I tried some other basic examples non usb related and they seemed to work fine but I could not make work the others especially

> **[GitHub - sekigon-gonnoc/Pico-PIO-USB: USB host/device implementation using...](https://github.com/sekigon-gonnoc/Pico-PIO-USB)**
>
> USB host/device implementation using PIO of raspberry pi pico (RP2040). - GitHub - sekigon-gonnoc/Pico-PIO-USB: USB host/device implementation using PIO of raspberry pi pico (RP2040).

Has anyone tried these examples on Tiny2040 before?

---

<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:** [September 12, 2023, 7:17pm UTC](https://forums.pimoroni.com/t/some-rp2040-examples-are-not-working-on-tiny2040/22925/2 "2023-09-12T19:17:05Z")

</div>

What error messages are you getting, if any?  
What uf2 file did you flash it with?

---

<div class="post-metadata">

**Author:** ![dan23](https://avatars.discourse-cdn.com/v4/letter/d/a3d4f5/32.png) [@dan23](https://forums.pimoroni.com/u/dan23)\
**Post date:** [September 12, 2023, 7:53pm UTC](https://forums.pimoroni.com/t/some-rp2040-examples-are-not-working-on-tiny2040/22925/3 "2023-09-12T19:53:04Z")

</div>

I cannot see any error. These are the uf2 files generated and used from the project “sekigon”:

./host\_hid\_to\_device\_cdc/host\_hid\_to\_device\_cdc.uf2  
./capture\_hid\_report/capture\_hid\_report.uf2  
./usb\_device/usb\_device.uf2

---

<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:** [September 13, 2023, 7:19am UTC](https://forums.pimoroni.com/t/some-rp2040-examples-are-not-working-on-tiny2040/22925/4 "2023-09-13T07:19:35Z")

</div>

Are those maybe written for the other Tiny?  
The ESP32 version, not a Tiny2040?  
[TinyPICO ESP32 Development Board with USB-C : ID 5028 : $21.95 : Adafruit Industries, Unique & fun DIY electronics and kits](https://www.adafruit.com/product/5028)

---

<div class="post-metadata">

**Author:** ![dan23](https://avatars.discourse-cdn.com/v4/letter/d/a3d4f5/32.png) [@dan23](https://forums.pimoroni.com/u/dan23)\
**Post date:** [September 13, 2023, 7:48am UTC](https://forums.pimoroni.com/t/some-rp2040-examples-are-not-working-on-tiny2040/22925/5 "2023-09-13T07:48:58Z")

</div>

My understanding is that they should work for PCBs based on RP2040. Also does it make any difference using a usb host female cable like for example: [USB Host Cable](https://shop.pimoroni.com/products/usb-host-cable?variant=31903651037267) versus a male breakout like [https://www.amazon.co.uk/dp/B07TFSZ3ZP?psc=1&ref=ppx\_yo2ov\_dt\_b\_product\_details](https://www.amazon.co.uk/dp/B07TFSZ3ZP?psc=1&ref=ppx_yo2ov_dt_b_product_details)?

---

<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:** [September 13, 2023, 8:00am UTC](https://forums.pimoroni.com/t/some-rp2040-examples-are-not-working-on-tiny2040/22925/6 "2023-09-13T08:00:21Z")

</div>

Ok, just wanted to make sure it was RP2040 compatible software.  
The cable would be how I would go.  
That male breakout is a “Serial Converter”, which I believe connects to the UART?  
This isn’t something I have ever tried, just so you know.

---

<div class="post-metadata">

**Author:** ![dan23](https://avatars.discourse-cdn.com/v4/letter/d/a3d4f5/32.png) [@dan23](https://forums.pimoroni.com/u/dan23)\
**Post date:** [September 13, 2023, 9:37am UTC](https://forums.pimoroni.com/t/some-rp2040-examples-are-not-working-on-tiny2040/22925/7 "2023-09-13T09:37:28Z")

</div>

Yes I connected the male breakout to the relative UART pins of Tiny2040. I tried running a simple CircuitPython script to print out the UART input coming from the connected USB device (mouse, keyboard, etc) but nothing. So I tried the examples above to see if something changes. I am a beginner so I am following a trail & error approach to get some high level understanding how different components work. I was thinking about a female port as I saw for Teensy 4.1 (which will be the next PCB to try if I cannot make it work with Tiny2040).

---

<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:** [September 13, 2023, 10:08am UTC](https://forums.pimoroni.com/t/some-rp2040-examples-are-not-working-on-tiny2040/22925/8 "2023-09-13T10:08:27Z")

</div>

Thats about how things go with me, when I try something I’ve never done before. I really hope you figure it out.

---

<div class="post-metadata">

**Author:** ![bablokb](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@bablokb](https://forums.pimoroni.com/u/bablokb)\
**Post date:** [September 13, 2023, 4:42pm UTC](https://forums.pimoroni.com/t/some-rp2040-examples-are-not-working-on-tiny2040/22925/9 "2023-09-13T16:42:51Z")

</div>

The Tiny2040 exposes only a subset of the RP2040 pins. Have a look at the source-code of sekigon and you will see it uses some RP2040 GPIOs not available on the Tiny2040 (they are available on the processor, but not to anything outside).

---

<div class="post-metadata">

**Author:** ![dan23](https://avatars.discourse-cdn.com/v4/letter/d/a3d4f5/32.png) [@dan23](https://forums.pimoroni.com/u/dan23)\
**Post date:** [September 13, 2023, 6:41pm UTC](https://forums.pimoroni.com/t/some-rp2040-examples-are-not-working-on-tiny2040/22925/10 "2023-09-13T18:41:27Z")

</div>

Actually I got to a similar conclusion when I tried to use ESP32-S3 by Adafruit as usb host, using some examples for the original ESP-IDF and noticed that GP19 and GP20 were not mapped on the Adafruit but I could not see the same info in the sekigon code and I have been using the GP0 and GP1 mainly (but I tried a few other random GP pins too).
