-
Notifications
You must be signed in to change notification settings - Fork 459
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from board import * | ||
import digitalio | ||
import storage | ||
|
||
noStorageStatus = False | ||
noStoragePin = digitalio.DigitalInOut(GP15) | ||
noStoragePin.switch_to_input(pull=digitalio.Pull.UP) | ||
noStorageStatus = not noStoragePin.value | ||
|
||
if(noStorageStatus == True): | ||
# don't show USB drive to host PC | ||
storage.disable_usb_drive() | ||
print("Disabling USB drive") | ||
else: | ||
# normal boot | ||
print("USB drive enabled") |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
003cede
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's less difficult if we do it without jumper wire.
We just need to make some change in boot.py.
if(noStorageStatus == True):--> if(noStorageStatus == False):
003cede
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there any way to make it show as an hid without wires