summaryrefslogtreecommitdiffstatshomepage
path: root/docs/pyboard/tutorial
diff options
context:
space:
mode:
authorPhilip Potter <philip.g.potter@gmail.com>2016-08-27 20:57:22 +0100
committerDamien George <damien.p.george@gmail.com>2016-08-29 15:15:25 +1000
commit57c92d90b0be9f353c5f0501f4d78a408911f8b2 (patch)
tree43baa8ef5e62953658fd8c370e32b9d29574cf59 /docs/pyboard/tutorial
parent13c5a228c9ec9881087bdddd162f3b633edc3aa5 (diff)
downloadmicropython-57c92d90b0be9f353c5f0501f4d78a408911f8b2.tar.gz
micropython-57c92d90b0be9f353c5f0501f4d78a408911f8b2.zip
docs/pyboard: Update USB mouse tutorial to use VCP instead of CDC.
Diffstat (limited to 'docs/pyboard/tutorial')
-rw-r--r--docs/pyboard/tutorial/usb_mouse.rst18
1 files changed, 9 insertions, 9 deletions
diff --git a/docs/pyboard/tutorial/usb_mouse.rst b/docs/pyboard/tutorial/usb_mouse.rst
index ac1de6e275..6e4feb6220 100644
--- a/docs/pyboard/tutorial/usb_mouse.rst
+++ b/docs/pyboard/tutorial/usb_mouse.rst
@@ -13,23 +13,23 @@ will look something like this::
import pyb
#pyb.main('main.py') # main script to run after this one
- #pyb.usb_mode('CDC+MSC') # act as a serial and a storage device
- #pyb.usb_mode('CDC+HID') # act as a serial device and a mouse
+ #pyb.usb_mode('VCP+MSC') # act as a serial and a storage device
+ #pyb.usb_mode('VCP+HID') # act as a serial device and a mouse
To enable the mouse mode, uncomment the last line of the file, to
make it look like::
- pyb.usb_mode('CDC+HID') # act as a serial device and a mouse
+ pyb.usb_mode('VCP+HID') # act as a serial device and a mouse
If you already changed your ``boot.py`` file, then the minimum code it
needs to work is::
import pyb
- pyb.usb_mode('CDC+HID')
+ pyb.usb_mode('VCP+HID')
-This tells the pyboard to configure itself as a CDC (serial) and HID
-(human interface device, in our case a mouse) USB device when it boots
-up.
+This tells the pyboard to configure itself as a VCP (Virtual COM Port,
+ie serial port) and HID (human interface device, in our case a mouse)
+USB device when it boots up.
Eject/unmount the pyboard drive and reset it using the RST switch.
Your PC should now detect the pyboard as a mouse!
@@ -121,9 +121,9 @@ If you leave your pyboard as-is, it'll behave as a mouse everytime you plug
it in. You probably want to change it back to normal. To do this you need
to first enter safe mode (see above), and then edit the ``boot.py`` file.
In the ``boot.py`` file, comment out (put a # in front of) the line with the
-``CDC+HID`` setting, so it looks like::
+``VCP+HID`` setting, so it looks like::
- #pyb.usb_mode('CDC+HID') # act as a serial device and a mouse
+ #pyb.usb_mode('VCP+HID') # act as a serial device and a mouse
Save your file, eject/unmount the drive, and reset the pyboard. It is now
back to normal operating mode.