Dotfiles, utilities, and other apparatus.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
318 B

  1. import board
  2. import digitalio
  3. import busio
  4. print("Check on the mic")
  5. # Try creating digital input:
  6. pin = digitalio.DigitalInOut(board.D4)
  7. print("Digital IO ok!")
  8. # I2C
  9. i2c = busio.I2C(board.SCL, board.SDA)
  10. print("I2C ok!")
  11. # SPI
  12. spi = busio.SPI(board.SCLK, board.MOSI, board.MISO)
  13. print("SPI ok!")
  14. print("done!")