Skip to content

Commit

Permalink
Changed pins and behavior to re-enable things.
Browse files Browse the repository at this point in the history
  • Loading branch information
Billfred committed Jul 22, 2021
1 parent affb16e commit 64ba1e2
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions boot.py
@@ -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()

0 comments on commit 64ba1e2

Please sign in to comment.