#define SV_Motor_x_PIN 32 #define SV_Motor_y_PIN 26 #define SV_Motor_z_PIN 14 #include<math.h> #define Deg2rad 3.1415 /180 #include <MadgwickAHRS.h> //MPU9250 #include <Wire.h> const int MPU_addr=0x68; // I2C address of the MPU-6050 int16_t AcX,AcY,AcZ,Tmp,GyX,GyY,GyZ,Mg</wire.h></madgwickahrs.h></math.h>…
#include "BluetoothSerial.h" #if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED) #error Bluetooth is not enabled! Please run `make menuconfig` to and enable it #endif #define Brushless_Motor_PIN 25 #define SV_Motor_PIN 32…
#include "BluetoothSerial.h" #include<math.h> #define Deg2rad 3.1415 /180 #include <MadgwickAHRS.h> //MPU9250関連 #include <Wire.h> const int MPU_addr=0x68; // I2C address of the MPU-6050 int16_t AcX,AcY,AcZ,Tmp,GyX,GyY,GyZ,MgX,MgY,MgZ; //取得データの実単位化スケールファ</wire.h></madgwickahrs.h></math.h>…
Receiver side #include "BluetoothSerial.h" #if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED) #error Bluetooth is not enabled! Please run `make menuconfig` to and enable it #endif #define Brushless_Motor_PIN 25 int i = 0…
Check MACadd void setup(void) { Serial.begin(115200); Serial.println("-----------------"); uint8_t macBT[6]; esp_read_mac(macBT, ESP_MAC_BT); } void loop() { uint8_t macBT[6]; esp_read_mac(macBT, ESP_MAC_BT); Serial.printf("%02X:%02X:%02X:…
//ref. https://101010.fun/iot/esp32-joystick.html //ref. https://wak-tech.com/archives/742 #define Right_VRX_PIN 12 #define Right_VRY_PIN 13 #define Left_VRX_PIN 25 #define Left_VRY_PIN 26 int left_x_val; int left_y_val; int right_x_val; i…
Bowl side source code //参考https://rikoubou.hatenablog.com/entry/2017/10/06/181805 #include <WiFi.h> #include <WiFiUdp.h> #include "esp_system.h" const char ssid[] = "ESP32_wifi"; // SSID const char pass[] = "esp32pass"; // password const int localPort = 10</wifiudp.h></wifi.h>…
Drone side source code //参考https://rikoubou.hatenablog.com/entry/2017/10/06/181805 #include<math.h> #define Deg2rad 3.1415 /180 #include <MadgwickAHRS.h> Madgwick MadgwickFilter; float quat[4] = {1.0, 0.0, 0.0 ,0.0}; float rate[3]; ///タイマー割込み 参考https:/</madgwickahrs.h></math.h>…