diff options
author | Vicki Lowe <Vicki.Lowe@gmail.com> | 2019-08-06 17:34:34 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2019-08-15 18:21:10 +1000 |
commit | afd10a45318443d67f37b2cc8fa158fe50e59f36 (patch) | |
tree | 3211454bdd0af57aca95d1b9fe71923858a19ca5 | |
parent | d5a77416064f8155b0a0817211541c296b49d2c7 (diff) | |
download | micropython-afd10a45318443d67f37b2cc8fa158fe50e59f36.tar.gz micropython-afd10a45318443d67f37b2cc8fa158fe50e59f36.zip |
docs/pyboard: Emphasize the instructions for making a USB mouse.
It wasn't clear why that element was `10` instead of `0`. Also bumped the
`10` to `100` to make the mouse movement more obvious.
-rw-r--r-- | docs/pyboard/tutorial/usb_mouse.rst | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/docs/pyboard/tutorial/usb_mouse.rst b/docs/pyboard/tutorial/usb_mouse.rst index 6f8831edb4..8166946ecd 100644 --- a/docs/pyboard/tutorial/usb_mouse.rst +++ b/docs/pyboard/tutorial/usb_mouse.rst @@ -39,14 +39,15 @@ Sending mouse events by hand To get the py-mouse to do anything we need to send mouse events to the PC. We will first do this manually using the REPL prompt. Connect to your -pyboard using your serial program and type the following:: +pyboard using your serial program and type the following (no need to type +the ``#`` and text following it):: >>> hid = pyb.USB_HID() - >>> hid.send((0, 10, 0, 0)) + >>> hid.send((0, 100, 0, 0)) # (button status, x-direction, y-direction, scroll) -Your mouse should move 10 pixels to the right! In the command above you -are sending 4 pieces of information: button status, x, y and scroll. The -number 10 is telling the PC that the mouse moved 10 pixels in the x direction. +Your mouse should move 100 pixels to the right! In the command above you +are sending 4 pieces of information: **button status**, **x-direction**, **y-direction**, and **scroll**. The +number 100 is telling the PC that the mouse moved 100 pixels in the x direction. Let's make the mouse oscillate left and right:: |