EasyManuals Logo

Adafruit Feather M4 Express User Manual

Adafruit Feather M4 Express
178 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #119 background imageLoading...
Page #119 background image
Metro M4 Express
Use jumper wires to connect A1 and any one of the GND
to different legs on the piezo.
To use A1, comment out the current pin setup line, and
uncomment the line labeled for the M4 boards. See the
details above!
Metro M4 Express has PWM on: A1, A5, D0, RX, D1, TX,
D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, SDA,
SCK, MOSI, MISO
There is No PWM on: A0, A2, A3, A4, SCL, AREF,
NEOPIXEL, LED_RX, LED_TX.
Where's My PWM?
Want to check to see which pins have PWM yourself? We've written this handy script! It attempts to setup PWM on
every pin available, and lets you know which ones work and which ones don't. Check it out!
import board
import pulseio
for pin_name in dir(board):
pin = getattr(board, pin_name)
try:
p = pulseio.PWMOut(pin)
p.deinit()
print("PWM on:", pin_name) # Prints the valid, PWM-capable pins!
except ValueError: # This is the error returned when the pin is invalid.
print("No PWM on:", pin_name) # Prints the invalid pins.
except RuntimeError: # Timer conflict error.
print("Timers in use:", pin_name) # Prints the timer conflict pins.
except TypeError: # Error returned when checking a non-pin object in dir(board).
pass # Passes over non-pin objects in dir(board).
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51 Page 124 of 183

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Adafruit Feather M4 Express and is the answer not in the manual?

Adafruit Feather M4 Express Specifications

General IconGeneral
BrandAdafruit
ModelFeather M4 Express
CategoryMicrocontrollers
LanguageEnglish

Related product manuals