Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By GengusKahn
#35918 The Posting on Youtube indicates this is indeed the only changes made.

The purpose of this posting was to allow easy access to the device without the requirement to understand the error messages being passed by the IDE.

The UDP is transferred through my "Host Server" another ESP with HTTP Server serving the required scripts and data storage space I have been using this to develop my fall detector as reliability is needed more than any other priority, power etc. are not an issue.
My requirements are detecting the acceleration to final angle(impact), temperature and time to recover, the person not the device......
User avatar
By Yangs10
#49222
reaper7 wrote:btw .... what is wrong with "official" arduino MPU6050 & I2Cdev libraries from:
https://github.com/jrowberg/i2cdevlib/tree/master/Arduino
??
For me works as expected.

only changes:
Code: Select all#include <avr/pgmspace.h>
to
Code: Select all#ifndef ESP8266
#include <avr/pgmspace.h>
#else
#include <pgmspace.h>
#endif
inside MPU6050.h, MPU6050_6Axis_MotionApps20.h, MPU6050_9Axis_MotionApps41.h

result from MPU6050_DMP6 example:
Code: Select allypr   145.32   10.33   39.51
ypr   145.32   10.34   39.52
ypr   145.33   10.34   39.54
ypr   145.32   10.34   39.55
ypr   145.31   10.36   39.56
ypr   145.31   10.35   39.56
ypr   145.31   10.32   39.56
ypr   145.31   10.30   39.55
ypr   145.33   10.30   39.56
ypr   145.35   10.29   39.58
ypr   145.37   10.29   39.60
ypr   145.37   10.30   39.60
ypr   145.37   10.31   39.60
ypr   145.35   10.31   39.58
ypr   145.34   10.30   39.57
ypr   145.34   10.30   39.56
ypr   145.35   10.31   39.56
ypr   145.36   10.31   39.57
ypr   145.37   10.30   39.59
ypr   145.39   10.29   39.60
ypr   145.42   10.28   39.62
ypr   145.42   10.27   39.63


Hi, Thank you for the info.

I tried with exactly what you statedin above post but get an error with the DMP example:

Testing device connections...
MPU6050 connection successful
Initializing DMP...
DMP Initialization failed (code 1)

The example code for the RAW data works fine.

i use a nodemcu esp8266 module with:
Wire.begin(4,5);
and no interrupt pin connected.

Did this ever happened to you?
User avatar
By frud0
#70069 Hello,

I am a beginner at the Arduino IDE and am facing a lot of trouble using libraries with it.

I have interfaced my NodeMCU v3 breakout board with the IDE - and successfully run few examples. Wrote a small PWM LED driving code for myself too, to know if I have actually understood or am only freeloading the example codes.

Trying to interface an MPU6050 with the NodeMCU to read the values off DMP. I wanted to use the trusted and easily available I2CLib for the purpose... when I try to include the library and "verify" the code, I get the following error.

I tried searching the internet for the error - couldn't find it. Either it is an EXTREMELY silly mistake, or I am truly unique. I cant find the file anywhere.



Can someone help me out?



In file included from C:\Users\*****\Documents\Arduino\MPU6050\Examples\MPU6050_DMP6\MPU6050_DMP6.ino:46:0:

sketch\I2Cdev.h:37:24: fatal error: driver/i2c.h: No such file or directory

#include <driver/i2c.h>

^

compilation terminated.

exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).