HID Mouse issues

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
NKD
Posts: 1
Joined: Tue Jul 22, 2014 1:31 pm

HID Mouse issues

Post by NKD » Tue Jul 22, 2014 1:40 pm

Hi.

I'm following the tutorial, but having trouble with the "Making the pyboard act as a USB mouse" section.

The controller does not seem to work when py.usb_mode('CDC+HID') is uncommented in the boot.py file.

When no code is saved in the main.py file, typing


"
>>> pyb.hid((0, 10, 0, 0))
"


into the PuTTY terminal when it is connected to the pyboard returns:


"
File "<stdin>", line 1, column 21
SyntaxError: invalid syntax
>>>

"


Also does not work with code in the main.py file, but then cannot connect to the pyboard via putty anymore:


"
import pyb

switch = pyb.Switch()
accel = pyb.Accel()

while not switch():
pyb.hid((0, accel.x(), accel.y(), 0))
pyb.delay(20)

"


When py.usb_mode('CDC+HID') is uncommented, I get an error for the pyboard as a usb mass storage device in device manager, from the device description in the properties:


"
This device cannot start. (Code 10)

The I/O device is configured incorrectly or the configuration parameters to the driver are incorrect.
"


Pyboard has worked fine and continues to work fine otherwise, when py.usb_mode('CDC+HID') is commented out. Working on an Acer Aspire V3-571G laptop running Windows 8.

I'm sure it is something that I am doing (or not doing), but I can't seem to work it out myself.

Thanks in advance for any help.

-NKD

User avatar
Markus Gritsch
Posts: 41
Joined: Fri May 16, 2014 9:04 pm

Re: HID Mouse issues

Post by Markus Gritsch » Wed Jul 23, 2014 7:35 pm


inaugurator
Posts: 23
Joined: Tue Sep 30, 2014 4:02 pm

Re: HID Mouse issues

Post by inaugurator » Wed Oct 29, 2014 3:31 pm

Now bug fixed :)
Evgeny

Post Reply