32-bit ARM Cortex-M4
32-bit ARM Cortex-M4
400 MHz
2048 KB Flash, 256 KB RAM
Open-source, based on C and C++
I2C, SPI, UART
USB, UART, I2C, SPI
36.5 mm x 36.5 mm x 10 mm
12 grams
5V, 3.3V
Quadcopters, hexacopters, octocopters, and more
Conclusion
The APM 2.8 Flight Controller (Without Compass) is a powerful and versatile autopilot system designed for a wide range of UAV and drone applications. Its open-source nature, high-performance processing, and flexible connectivity options make it an ideal choice for both amateur and professional users.
APM 2.8 Flight Controller (Without Compass) DocumentationOverviewThe APM 2.8 Flight Controller (Without Compass) is a popular open-source autopilot system designed for quadcopters, planes, and helicopters. It is a compact, lightweight, and highly capable flight controller that provides precise navigation and control capabilities. This documentation provides an overview of the APM 2.8 Flight Controller, its features, and code examples to demonstrate its usage in various contexts.Features32-bit ARM Cortex-M4 processor with FPU
3-axis accelerometer and 3-axis gyroscopic sensors
1 MB of flash memory and 128 KB of SRAM
Supports multiple sensors, including GPS, airspeed, and barometric pressure
Compatible with various flight modes, including Acro, Stabilize, and Loiter
Supports multiple communication protocols, including USB, UART, and I2CHardware ConnectionsThe APM 2.8 Flight Controller has the following hardware connections:USB port for programming and debugging
6-pin ISP header for programming
4-pin serial port for telemetry and console output
3-pin I2C port for connecting sensors and peripherals
4-pin GPS port for connecting GPS modules
Multiple analog and digital input pins for connecting sensors and other devicesSoftwareThe APM 2.8 Flight Controller uses the ArduPilot firmware, which is an open-source autopilot system. The firmware provides a range of features, including navigation, control, and sensor integration.Code Examples### Example 1: Basic Flight Control using APM 2.8 and GPSThis example demonstrates how to use the APM 2.8 Flight Controller with a GPS module to control a quadcopter's flight.```c
#include <AP_Common.h>
#include <AP_GPS.h>
#include <AP_Nav.h>void setup() {
// Initialize GPS module
AP_GPS::init();
// Set flight mode to Stabilize
nav_set_mode(NAV_MODE_STABILIZE);
}void loop() {
// Read GPS data
GPS::read();
// Get current location
Location loc = gps.location();
// Set waypoints for navigation
nav_set_wp(loc, 10.0, 20.0);
// Update navigation
nav_update();
// Control motors
motor_control();
// Delay for next iteration
delay(50);
}
```### Example 2: Autonomous Takeoff and Landing using APM 2.8 and Barometric Pressure SensorThis example demonstrates how to use the APM 2.8 Flight Controller with a barometric pressure sensor to autonomously take off and land a quadcopter.```c
#include <AP_Common.h>
#include <AP_Baro.h>
#include <AP_Nav.h>void setup() {
// Initialize barometric pressure sensor
AP_Baro::init();
// Set flight mode to Auto
nav_set_mode(NAV_MODE_AUTO);
}void loop() {
// Read barometric pressure data
Baro::read();
// Get current altitude
float altitude = baro.get_altitude();
// Check for takeoff condition
if (altitude < 2.0) {
// Takeoff sequence
nav_takeoff(10.0);
}
// Check for landing condition
if (altitude < 1.0) {
// Landing sequence
nav_land();
}
// Update navigation
nav_update();
// Delay for next iteration
delay(50);
}
```These code examples demonstrate the basic usage of the APM 2.8 Flight Controller in various contexts. Please note that this is not an exhaustive list, and the APM 2.8 Flight Controller is capable of many more features and configurations.