Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed pins and behavior to re-enable things.
- Loading branch information
Showing
1 changed file
with
12 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,18 @@ | ||
import board | ||
import digitalio | ||
import storage | ||
import usb_cdc | ||
import usb_hid | ||
|
||
pin5 = digitalio.DigitalInOut(board.A5) | ||
pin4 = digitalio.DigitalInOut(board.A4) | ||
pin4.switch_to_input(pull=digitalio.Pull.UP) | ||
pin5.switch_to_input(pull=digitalio.Pull.UP) | ||
notpin4 = not pin4 | ||
notpin5 = not pin5 | ||
switch3 = digitalio.DigitalInOut(board.D3) | ||
switch3.pull = digitalio.Pull.UP | ||
switch5 = digitalio.DigitalInOut(board.D5) | ||
switch5.pull = digitalio.Pull.UP | ||
|
||
if notpin4 and notpin5: | ||
storage.disable_usb_drive() # disable CIRCUITPY USB drive | ||
usb_cdc.disable() # disable REPL | ||
usb_midi.disable() # disable MIDI | ||
if switch3 and switch5: | ||
print("Holla if you hear me! \n") | ||
import storage | ||
|
||
usb_hid.enable((usb_hid.KEYBOARD)) | ||
storage.disable_usb_drive() | ||
import usb_midi | ||
|
||
pin4.deinit() | ||
pin5.deinit() | ||
usb_midi.disable() | ||
import usb_cdc | ||
usb_cdc.disable() |