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

Esp8266 connect MPU6050 #5

Open
icefreesky opened this issue Apr 10, 2021 · 7 comments
Open

Esp8266 connect MPU6050 #5

icefreesky opened this issue Apr 10, 2021 · 7 comments

Comments

@icefreesky
Copy link

icefreesky commented Apr 10, 2021

Hello, after the firmware esp cannot connect to mpu6050, I connected everything according to the instructions with all the harness, but in the terminal it displays such a message

 Sensor 8 Startup! 
Initialising Wifi
ssid: Bewegungsfelder
Creating data connection 
i2c Scan 
done
initialising sensor 
i2c_writeBytes: no ack after slave addr: 0x68
mpu_init failed. Status: -1
init_sensor failed.
EVENT_STAMODE_CONNECTED
Event: EVENT_STAMODE_GOT_IP

Maybe you know what this could mean , In order for it to be flashed, the entire makefale had to be rewritten, it may be connected with this, several modules checked the same result

@herzig
Copy link
Owner

herzig commented Apr 10, 2021

Great that you could flash it. I don't think it has anything to do with the makefile or your toolchain setup. Looks more like an issue with the I2C Connection.
Does the IMU show up if you do an i2c scan (should be at address 0x68)? Whenever I had issues like this it was usually that the wiring was faulty/wrong pull-up resistors/bad solder joints.

@icefreesky
Copy link
Author

When scanning with an i2c scan file, it finds two addresses 0x68 , 0x69

@icefreesky
Copy link
Author

Thanks soldering directly helped, now another error:

 Sensor 8 Startup! 
Initialising Wifi
ssid: Bewegungsfelder
Creating data connection 
i2c Scan 
found device at: 0x68
done
initialising sensor 
uploading dmp firmware
mpu/dmp running
EVENT_STAMODE_CONNECTED
Event: EVENT_STAMODE_GOT_IP
read_fifo_failed 

@icefreesky
Copy link
Author

icefreesky commented Apr 25, 2021

Мaybe look at the project on your computer and update the makefile here so that others can also build it and write down the rules and in one look at why the problem is in the fifo,
we are creating a 3d cartoon series and if we succeed in making this motion capture costume, we will have a profit and we will be able to thank you financially in the future for your huge contribution to the affordable mocap
Eclipse project

@herzig
Copy link
Owner

herzig commented Apr 28, 2021

The serial output looks good. I think to recall that this error (read_fifo_failed) can happen ocne in a while, but the sensor still works.

Can you check if you can receive any sensor data via UDP (either monitor UDP traffic, or use the bewegungsfelder app). If not I suggest you add some debug messages (serial print) throughout the sensor code to see where it gets stuck. I'm quite certain that the makefile is not the problem here. Once the project builds and you can upload it to the sensor and it still doesn't work then the problem is likely somewhere else in the code or in the wiring.

@icefreesky
Copy link
Author

Thank you, but the server address in the sensor settings is which to set... this from the router should be an address or local, because I am creating a server at 127.0.0.1: 8080, but it is not available from outside if you call from the phone, etc. Just on the screen of the example program address 192.168.1.6 router also need to be properly configured so that it can work as a server?

@herzig
Copy link
Owner

herzig commented May 6, 2021

The server is the computer that runs the Bewegungsfelder app to collect the data. The individual sensors send the data to this server address.
While it should not strictly matter that the server is on the same network as the sensors, I'd recommend it, otherwise you may need to configure routers appropriately.

If the sensors and the server are on the same network. Then you don't need to configure your router. For example put your sensors addresses at 192.168.1.10/24 - 192.168.1.15/24 and run your server on 192.168.1.5/24 (and make sure both are on the same wifi/network), it should work just fine.

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

No branches or pull requests

2 participants