ESP32 | FLUTTER | BLE - MPU6050, Rotate your 3d object in the app

Опубликовано: 06 Октябрь 2019
на канале: That Project
18,654
like

In this video, I show you how to use the MPU6050 Accelerometer and Gyroscope sensor with the ESP32. First, I will explain how the MPU6050 works and how to read the data from it, and then we will make a flutter application for a 3D visualization of the sensor orientation.

MPU6050 IMU
ESP32 Wemos Lolin32 lite

**How to fix this
error: 'Trash' was not declared in this scope
getFIFOBytes(Trash, (uint8_t)RemoveBytes);
^
exit status 1

Go to your Arduino library folder, open the folder MPU6050.
Now you can find MPU6050.h. After line# 432, you need to add this,"#define BUFFER_LENGTH 32".
**

**Flutter App
Add permissions for Bluetooth
We need to add the permission to use Bluetooth and access location:

Android
In the android/app/src/main/AndroidManifest.xml let’s add:

uses-permission android:name="android.permission.BLUETOOTH"/
uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /
uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/
application

IOS
In the ios/Runner/Info.plist let’s add:

dict
key NSBluetoothAlwaysUsageDescription /key
string Need BLE permission /string
key NSBluetoothPeripheralUsageDescription /key
string Need BLE permission /string
key NSLocationAlwaysAndWhenInUseUsageDescription /key
string Need Location permission /string
key NSLocationAlwaysUsageDescription /key
string Need Location permission /string
key NSLocationWhenInUseUsageDescription /key
string Need Location permission /string

[i2cdevlib - I2C device library collection for AVR/Arduino or other C++-based MCUs]
https://github.com/jrowberg/i2cdevlib

[i2cdevlib Arduino]
https://github.com/jrowberg/i2cdevlib...

[i2cdevlib Arduino MPU6050]
https://github.com/jrowberg/i2cdevlib...

[Create GitHub Resource Download Link]
https://minhaskamal.github.io/DownGit/

[ESP32 BLE for Arduino]
https://github.com/nkolban/ESP32_BLE_...

[Flutter Blue]
https://pub.dev/packages/flutter_blue

[FLUTTER BLUE Installation failed on osx]
https://github.com/pauldemarco/flutte...

[iOS build issue - NSBluetoothAlwaysUsageDescription]
https://developer.apple.com/documenta...

[Flutter 3d Obj]
https://pub.dev/packages/flutter_3d_obj

[Gimbal lock]
https://en.wikipedia.org/wiki/Gimbal_...

[Project Github Link]
https://github.com/0015/IdeasNProject...

Music:
Music provided by NoCopyRightSounds from Youtube.

#ESP32 #Arduino #FLUTTER #BLE #MPU6050 #visualization #3d #6DoF #accelerometer #gyroscope #DIY #I2C


Смотрите видео ESP32 | FLUTTER | BLE - MPU6050, Rotate your 3d object in the app онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь That Project 06 Октябрь 2019, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 18,654 раз и оно понравилось like людям.