Circuitpython on Pyboard 1.1 HID USB Busy

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
JohnFitz
Posts: 4
Joined: Wed Apr 15, 2020 10:26 am

Circuitpython on Pyboard 1.1 HID USB Busy

Post by JohnFitz » Wed Apr 15, 2020 10:28 am

Hi everyone,
i've some problems with the board in the description. In particular when I try to use the adafruit hid library, in the REPL i see an OS Error: USB busy. Since I'm new to this type of devices, I ask for your help.
Moreover when I flash the firmware with STM32Cube Programmer tool, the pyboard reboot but the drive name is not CIRCUITPY, but a windows generic one.
If someone could help me...
Thank you in advance!

Have a nice day!

Firmware version https://circuitpython.org/board/pyboard_v11/
Library version 5.x https://circuitpython.org/libraries
Last edited by JohnFitz on Wed Apr 15, 2020 1:36 pm, edited 1 time in total.

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Circuitpython on Pyboard 1.1 HID USB Busy

Post by jimmo » Wed Apr 15, 2020 12:52 pm

Hi,

I was about to suggest that you might have more luck asking about this on the CircuitPython forum but I see that you have also done that. Always a good idea to cross link posts to avoid people duplicating effort answering the question. https://forums.adafruit.com/viewtopic.php?f=60&t=164478

Some extra information would be helpful. What is the version (and filename) of the DFU / BIN file you flashed? What do you mean by "generic windows one". What is the contents of this drive? Are you able to connect to the REPL and see the CircuitPython (or MicroPython) startup message?

JohnFitz
Posts: 4
Joined: Wed Apr 15, 2020 10:26 am

Re: Circuitpython on Pyboard 1.1 HID USB Busy

Post by JohnFitz » Wed Apr 15, 2020 1:26 pm

Thank you for the response.
I've tried to use the last version of the firmware available here https://circuitpython.org/board/pyboard_v11/ and i've downloaded the version 5.x of the adafruit library as suggested here https://circuitpython.org/libraries.
Once I've uploaded the new firmware with the st tool, the flash disk is known by windows but it's name is New drive volume E, instead of CIRCUITPY. (I'm wondering if it is a problem or it is normal). REPL works, and also a simple script "Hello World" does. The problem is that using the hid library, from REPL i see the error message: OSError: USB busy. I've tried to search on the web but no luck.
Thank you in advance.
Any help would be appreciated!

JohnFitz
Posts: 4
Joined: Wed Apr 15, 2020 10:26 am

Re: Circuitpython on Pyboard 1.1 HID USB Busy

Post by JohnFitz » Wed Apr 15, 2020 2:39 pm

The idea is to use the pyboard as a hid joystick in Windows. If you know other ways to do it with a pyboard, you have my attention!

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Circuitpython on Pyboard 1.1 HID USB Busy

Post by jimmo » Thu Apr 16, 2020 1:00 am

I see Scott has replied to you on the Adafruit forum.

I don't know much about CircuitPython, but it sounds like it works in a similar way to MicroPython here -- you configure at startup which mode you want the USB to be in.

Unfortunately I'm not aware of any support for HID joystick mode in MicroPython, although keyboard and mouse work well. Would you be able to do what you want by emulatng a keyboard or mouse instead?

JohnFitz
Posts: 4
Joined: Wed Apr 15, 2020 10:26 am

Re: Circuitpython on Pyboard 1.1 HID USB Busy

Post by JohnFitz » Thu Apr 16, 2020 7:07 am

Thank you for your help.
Unfortunatly I need a Joystick because the idea is to use an IMU and translate the motion in x,y,z as joystick axes.
Considering also the reply on adafruit forum, I think I have to change the platform.
Thank you again!

Have a nice day!

Post Reply