The Adafruit QT Py is a compact, versatile development board based on the Microchip SAMD21E18 ARM Cortex-M0+ microcontroller. It is designed for ease of use and flexibility, featuring a USB-C connector for programming and power, a built-in RGB NeoPixel LED, and a variety of GPIO pins. The QT Py is compatible with CircuitPython and Arduino IDE, which allows it to be used in a wide range of projects, from simple LED controls to more complex IoT applications.
Pin # | Function | Description |
---|---|---|
1 | A0/D0 | Analog input or digital I/O, PWM |
2 | A1/D1 | Analog input or digital I/O, PWM, DAC |
3 | A2/D2 | Analog input or digital I/O, PWM |
4 | A3/D3 | Analog input or digital I/O, PWM |
5 | SDA | I2C data line |
6 | SCL | I2C clock line |
7 | TX | UART transmit |
8 | RX | UART receive |
9 | SCK | SPI clock |
10 | MO | SPI master out, slave in |
11 | MI | SPI master in, slave out |
- | GND | Ground |
- | 3V | 3.3V power supply |
- | RST | Reset pin |
- | USB | USB-C for programming and power |
Q: Can I power the QT Py with a battery? A: Yes, you can power the QT Py with a battery, but ensure that the voltage is within the recommended input voltage range.
Q: Is the QT Py breadboard-friendly? A: Yes, the QT Py is designed with breadboard-friendly spacing.
Q: How do I reset the board? A: Briefly press the RST button to reset the board. Double-press to enter the bootloader mode for firmware updates.
Below is a simple example code that blinks the onboard NeoPixel LED on the Adafruit QT Py using the Arduino IDE.
#include <Adafruit_NeoPixel.h>
#define PIN 0 // Define the pin for the NeoPixel
#define NUMPIXELS 1 // Number of pixels in the NeoPixel
// Initialize the NeoPixel library.
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
pixels.begin(); // Initialize the NeoPixel
}
void loop() {
pixels.setPixelColor(0, pixels.Color(150, 0, 0)); // Set the color to red
pixels.show(); // Send the updated pixel colors to the hardware.
delay(500); // Wait for half a second
pixels.clear(); // Turn off the NeoPixel
pixels.show();
delay(500); // Wait for half a second
}
Remember to install the Adafruit_NeoPixel
library through the Arduino Library Manager before uploading this code to the QT Py. This example assumes that the onboard NeoPixel is connected to pin 0, which is the default for the Adafruit QT Py.