fix misspelling
parent
59230babf3
commit
7ff53fb9ab
|
@ -20,7 +20,7 @@ import pyb
|
|||
pyb.usb_mode('CDC+HID')
|
||||
```
|
||||
|
||||
`import pyb` imports the pyb module, that let's you access the functions and methods for controlling the pyboard. `pyb.usb_mode()` let's you set as what kind of device the pyboard should act if connected to USB. `'CDC+HID'` means 'Human Interface Device' - in this mode the board is recognized as if it where a mouse or keyboard. In this example, this only means that it is NOT recognized as mass storage device, so the file system doesn't get mounted.
|
||||
`import pyb` imports the pyb module, that let's you access the functions and methods for controlling the pyboard. `pyb.usb_mode()` let's you set as what kind of device the pyboard should act if connected to USB. `'CDC+HID'` means 'Human Interface Device' - in this mode the board is recognized as if it were a mouse or keyboard. In this example, this only means that it is NOT recognized as mass storage device, so the file system doesn't get mounted.
|
||||
The problem is, now we can't access the filesystem anymore, so you'd have to remove the SD-card and put it into a SD-card reader to get back your data or to change the scripts again. Now, if we set `pyb.usb_mode()` back to `'CDC+MSC'`, the pyboard would act as SD-card reader. So, we use the switch to change between these modes. After reset, you have a short time window. If the switch is pressed and hold, the board acts as mass storage, if not it acts as Human Interface Device.
|
||||
|
||||
```python
|
||||
|
|
Loading…
Reference in New Issue