12#include "comp_ahrs.hpp"
13#include "comp_gui.hpp"
14#include "comp_inference.hpp"
15#include "fluxsand.hpp"
21 PWM pwm_buzzer(0, 50, 7.5);
23 pwm_buzzer.PlayNote(PWM::NoteName::C, 7, 250);
24 std::this_thread::sleep_for(std::chrono::milliseconds(300));
25 pwm_buzzer.PlayNote(PWM::NoteName::D, 7, 250);
26 std::this_thread::sleep_for(std::chrono::milliseconds(300));
27 pwm_buzzer.PlayNote(PWM::NoteName::E, 7, 250);
28 std::this_thread::sleep_for(std::chrono::milliseconds(300));
33 Gpio gpio_user_button_1(
"gpiochip0", 23,
false, 1);
34 Gpio gpio_user_button_2(
"gpiochip0", 24,
false, 1);
37 SpiDevice spi_display(
"/dev/spidev1.0", 1000000, SPI_MODE_0);
38 Gpio gpio_display_cs(
"gpiochip0", 26,
true, 1);
39 Max7219<8> display(spi_display, &gpio_display_cs);
45 I2cDevice i2c_aht20(
"/dev/i2c-1", Aht20::DEFAULT_I2C_ADDR);
46 Aht20 aht20(i2c_aht20);
50 Gpio gpio_ads1115_int(
"gpiochip0", 5,
false, 1);
51 Ads1115<2> ads1115(i2c_mpu9250, gpio_ads1115_int);
54 SpiDevice spi_imu_device(
"/dev/spidev0.0", 1000000, SPI_MODE_0);
55 Gpio gpio_imu_cs(
"gpiochip0", 22,
true, 1);
56 Gpio gpio_imu_int(
"gpiochip0", 27,
false, 1);
57 Mpu9250 mpu9250(&spi_imu_device, &gpio_imu_cs, &gpio_imu_int);
61 mpu9250.RegisterDataCallback(std::bind(
62 &AHRS::OnData, &ahrs, std::placeholders::_1, std::placeholders::_2));
65 ahrs.RegisterDataCallback(std::bind(
66 &InferenceEngine::OnData, &inference_engine, std::placeholders::_1,
67 std::placeholders::_2, std::placeholders::_3));
74 FluxSand fluxsand(&pwm_buzzer, &gpio_user_button_1, &gpio_user_button_2, &gui,
75 &bmp280, &aht20, &ads1115, &ahrs, &inference_engine);
ADS1115 ADC driver with GPIO interrupt-based channel cycling.
static constexpr uint8_t DEFAULT_I2C_ADDR
LED Matrix GUI Controller with Dual Orientation Support and Sand Animation Physics.
PWM driver with Beep and PlayNote functionality.