The Adafruit Feather M4 Express is a compact, feature-rich development board designed for versatility and ease of use. It is based on the ATSAMD51 microcontroller and is part of the Feather ecosystem, known for its portable and modular design. This board is ideal for a wide range of applications, from prototyping to final products, including IoT devices, wearable technology, and embedded systems.
Pin Number | Function | Description |
---|---|---|
1 | GND | Ground |
2 | 3V | 3.3V power supply pin |
3-8 | A0-A5 | Analog input pins or digital I/O |
9-10 | SCK, MISO | SPI communication pins |
11-12 | MOSI, SDA | SPI communication pin, I2C data line |
13 | SCL | I2C clock line |
14-25 | D0-D11 | Digital I/O pins, PWM capable on D5, D6, D9-D11 |
26 | RX | UART receive pin |
27 | TX | UART transmit pin |
28 | EN | Enable pin for the 3.3V regulator |
29 | BAT | Battery voltage (connected to battery connector) |
30 | USB | Native USB port |
31 | NeoPixel | Data input for the onboard NeoPixel LED |
32 | RST | Reset pin |
#include <Adafruit_NeoPixel.h>
#define PIN_NEOPIXEL 8 // Pin connected to the NeoPixel
#define NUMPIXELS 1 // Number of NeoPixels
// Initialize the NeoPixel library.
Adafruit_NeoPixel pixels(NUMPIXELS, PIN_NEOPIXEL, NEO_GRB + NEO_KHZ800);
void setup() {
pixels.begin(); // Initialize the NeoPixel strip
}
void loop() {
pixels.setPixelColor(0, pixels.Color(150, 0, 0)); // Set the pixel to red
pixels.show(); // Send the updated pixel colors to the hardware.
delay(500); // Wait for half a second
pixels.clear(); // Turn off the pixel
pixels.show();
delay(500);
}
Q: Can I use the Feather M4 Express with a 5V system? A: The board operates at 3.3V. Level shifting is required to interface with 5V systems.
Q: How do I charge the connected LiPo battery? A: The Feather M4 Express has a built-in charging circuit. Simply connect the board to a USB power source, and it will charge the battery.
Q: What is the maximum current draw from a GPIO pin? A: Each GPIO pin can source or sink up to 10 mA. However, the total current from all GPIO pins should not exceed 120 mA.