Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes required for ESP32 with Arduino IDE #367

Merged
merged 62 commits into from
Jun 28, 2019
Merged

Changes required for ESP32 with Arduino IDE #367

merged 62 commits into from
Jun 28, 2019

Conversation

BJDev95
Copy link

@BJDev95 BJDev95 commented Mar 31, 2018

To use the Lib for ESP32 within the Arduino IDE the following changes should be made:

In file I2Cdev.cpp add directly under #include "I2Cdev.h"

#ifdef ARDUINO_ARCH_ESP32
#define BUFFER_LENGTH I2C_BUFFER_LENGTH
#endif

And in file MPU6050_6Axis_MotionApps20.h add the check for ESP32 boards

        #ifndef ARDUINO_ARCH_ESP32
        typedef void prog_void;
        typedef char prog_char;
        typedef unsigned char prog_uchar;
        typedef int8_t prog_int8_t;
        typedef uint8_t prog_uint8_t;
        typedef int16_t prog_int16_t;
        typedef uint16_t prog_uint16_t;
        typedef int32_t prog_int32_t;
        typedef uint32_t prog_uint32_t;
        #endif

eric-wieser and others added 30 commits November 25, 2013 14:34
Since `getRawTemperature` and `getRawPressure()` return 0 on failure, the corresponding high-level functions should return `NaN`, rather than processing 0 and emitting a meaningless value.
  Arduino sketch to find device-specific offsets to tell an IMU6050 that it is at rest in neutral position.
Add IMU_Zero example for MPU-6050 zero calibration
Remove misplaces .ino example from project root
  Improved search, added more instructive comments.
Improved search and added instructions in comments.
Improvements in comments and search strategy.
Remove duplicate IMU_Zero.ino from incorrect folder
Fixed typo in DS1307 implementation
Unknown function is actually setting start address of DMP, where the firmware is supposed to execute.
Source: http://www.robotrebels.org/index.php?topic=318.0

<< Register 109    (0x6D)           Bank Select Address – firmware loaded in 256 byte banks 0-11 (total 3k)
Register 110   (0x6E)      Bank Memory Address – the actual byte address within the bank
Register 111   (0x6F)      Firmware Read/Write – the portal to read and write a byte through
Register 112   (0x70)      Program Start Address H – this is where this firmware version begins to execute (0x0400) {0x0300 in our case}
Register 113   (0x71)      Program Start Address L >>
Unknown function is actually setting start address
  Added delay to keep from reading IMU faster than 200 Hz.  Without the delays, program hangs on some devices.  Comments expanded.
Handle error codes in derived measurement functions
There was a wrong type of variable RawValue and it didn't compile.
Fixed wrong type of variable
The ```getAdjustment()``` and ```setAdjustment()``` functions need to put the magnetometer in fuse ROM access mode before the adjustment registers can be read as specified in the datasheet.
Dariusz Krempa and others added 14 commits August 28, 2017 22:07
Added ESP32 esp-idf platform
Arduino and Processing sketches modified to support quaternion data over
Open Sound Control over UDP. Arduino sketch modified to run on ESP8266.
Add pointer initialization in MPU6050.cpp
Port to STM32 using Keil MDK pack.
Entering fuse ROM access mode to read adjustment registers
Fix typos in example sketches
BMP085/BMP180: Added polling for end of conversion bit. Updated example. Removed unnecessary float.
Add support for ESP8266 and OSC
DS1307 Arduino library - build error caused by non const progmem fixed
Fix bug in writeBytes method for nRF51
@vinicius121 vinicius121 mentioned this pull request Apr 6, 2018
jensh and others added 10 commits April 25, 2018 15:40
This implements the integer only version of
"uint8_t MPU6050::dmpGetGravity(VectorFloat *v, Quaternion *q)".

int16_t *data is assumed to be a vector with 3 components int16_t
data[3]. +1g corresponds to +8192, sensitivity is 2g.
Implement MPU6050::dmpGetGravity(int16_t *data, const uint8_t* packet);
Changed I2Cdev.h I2CDEV_IMPLEMENTATION back to I2CDEV_ARDUINO_WIRE
Changes I2CDEV_IMPLEMENTATION back to I2CDEV_ARDUINO_WIRE
Signed-off-by: Alexandr Zarubkin <[email protected]>
Added Shuning (Steve) Bian's SBWire no lockup library as an option in I2Cdev.h/cpp
Pls try this code ... my freezing problem is been resolved to greater extent...
Default buffer size for I2C transmissions is 32 if not otherwise set.
This is a band-aid fix since there is almost certainly a more efficient
way to handle this, possibly by removing the chunking process entirely
from the I2Cdev layer if Wire implements it now based on its own
internal buffering (not sure).
@costyn
Copy link

costyn commented Jun 26, 2019

To use the Lib for ESP32 within the Arduino IDE the following changes should be made:

In file I2Cdev.cpp add directly under #include "I2Cdev.h"

#ifdef ARDUINO_ARCH_ESP32
#define BUFFER_LENGTH I2C_BUFFER_LENGTH
#endif

And in file MPU6050_6Axis_MotionApps20.h add the check for ESP32 boards

        #ifndef ARDUINO_ARCH_ESP32
        typedef void prog_void;
        typedef char prog_char;
        typedef unsigned char prog_uchar;
        typedef int8_t prog_int8_t;
        typedef uint8_t prog_uint8_t;
        typedef int16_t prog_int16_t;
        typedef uint16_t prog_uint16_t;
        typedef int32_t prog_int32_t;
        typedef uint32_t prog_uint32_t;
        #endif

When will this pull request be merged into the master? Manually edited the files now. :) Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.