Description
I have uploaded the sketch, and connected to wifi, accessing the setup pages. Under tracker yaw , pitch and roll all show 0degrees. When I click calibrate the webpage says "Unknown error" but the Serial Monitor goes through the calibration, leaving on flat surface then waving in figure 8.
I am using a Wemos d1 r1 mini https://miro.medium.com/max/2576/1*YKc8KpAfMrlhrOLmNjdRwQ.png and mpu 9250
pins are wired as such
wemos ----- mpu9250
GND ---- GND
3.3v --- VCC
D1 ---- SCL
D2 --- SDA
I wasnt sure if the INT pin was needed but doesnt look like it. I also tried opening up opentrack but still there no data looks like it was being sent as it stayed at 0 for all YPR. I couldnt find a good place to try and debug and possible Serial print the data from the mpu.
Appreciate any help, this project is exactly what i started to try and do myself, but came across this and was way more put together than what I had.
here are a few pictures of the webpage
https://i.imgur.com/QK052Dx.png
https://i.imgur.com/8nK548w.png
here is the serial monitor output.
*WM: [2] Connection result: WL_CONNECTED
*WM: [3] lastconxresult: WL_CONNECTED
*WM: [1] AutoConnect: SUCCESS
*WM: [1] STA IP Address: 10.10.11.234
connected...yeey :)
*WM: [1] Starting Web Portal
*WM: [3] dns server started with ip:
*WM: [2] HTTP server started
*WM: [2] WiFi Scan completed in 2194 ms
mounted file system
reading config file
opened config file
{
"tracker_server": "10.10.10.165",
"tracker_port": "5555",
"tracker_protocol": "freepie",
"mpu9250": {
"AB0": -0.112976,
"AB1": -0.224731,
"AB2": -0.070923,
"GB0": -1.427481,
"GB1": 1.961832,
"GB2": 2.908397,
"MB0": -257.3269,
"MB1": 143.7481,
"MB2": 187.0547,
"MS0": 1.001961,
"MS1": 0.887153,
"MS2": 1.143177
},
"zero": {
"yaw": 0,
"pitch": 0,
"roll": 0,
"x": 0,
"y": 0,
"z": 0
}
}has tracker location
Initializing MPU9250...
Scanning...
I2C device found at address 0x68 !
done
MPU9250 9-axis motion sensor...
MPU9250 is online...
x-axis self test: acceleration trim within : 1.0% of factory value
y-axis self test: acceleration trim within : 1.1% of factory value
z-axis self test: acceleration trim within : 1.6% of factory value
x-axis self test: gyration trim within : 8.7% of factory value
y-axis self test: gyration trim within : 11.1% of factory value
z-axis self test: gyration trim within : 1.0% of factory value
Using saved calibration.
MPU9250 initialized for active data mode....
AK8963 I AM 48 I should be 48
AK8963 initialized for active data mode....
DMP Ready!*WM: [2] <- HTTP Root
*WM: [3] -> 10.10.11.234
*WM: [3] lastconxresult: WL_CONNECTED
*WM: [2] WiFi Scan completed in 2195 ms
*WM: [2] <- HTTP Param
*WM: [3] lastconxresult: WL_CONNECTED
*WM: [3] Sent param page
About to start calibrating gyro and accelerator, keep device flat and still!!!
Starting....
Finnished in 0.4 seconds
About to start calibrating magnetic compass, Wave device in a figure eight until done!
Starting....
Mag Calibration: Wave device in a figure eight until done!
Mag Calibration done!
Finnished in 22.5 seconds
saving config
ets Jan 8 2013,rst cause:2, boot mode:(3,7)
load 0x4010f000, len 3656, room 16
tail 8
chksum 0x0c
csum 0x0c
v9c56ed1f
~ld
Starting
*WM: [3] allocating params bytes: 20
*WM: [2] Added Parameter:
*WM: [2] Added Parameter: track_server
*WM: [2] Added Parameter: track_port
*WM: [2] Added Parameter: track_protocol
*WM: [2] Added Parameter:
*WM: [1] <form action='/wifi' method='get'><button>Configure WiFi</button></form><br/>
<form action='/0wifi' method='get'><button>Configure WiFi (No Scan)</button></form><br/>
<form action='/info' method='get'><button>Info</button></form><br/>
<form action='/param' method='get'><button>Setup</button></form><br/>
<hr><br/><form action='/erase' method='get'><button class='D'>Erase</button></form><br/>
<form action='/restart' method='get'><button>Restart</button></form><br/>
*WM: [1] AutoConnect
*WM: [2] esp_wifi_set_country: US
*WM: [2] Connecting as wifi client...
*WM: [3] STA static IP:
*WM: [2] setSTAConfig static ip not set, skipping
*WM: [1] Connecting to SAVED AP: OHS_WiFi
*WM: [3] Using Password: 0rangut@n
*WM: [3] WiFi station enable
*WM: [3] enableSTA PERSISTENT ON
*WM: [1] connectTimeout not set, ESP waitForConnectResult...
*WM: [2] Connection result: WL_CONNECTED
*WM: [3] lastconxresult: WL_CONNECTED
*WM: [1] AutoConnect: SUCCESS
*WM: [1] STA IP Address: 10.10.11.234
connected...yeey :)
*WM: [1] Starting Web Portal
*WM: [3] dns server started with ip:
*WM: [2] HTTP server started
*WM: [2] WiFi Scan completed in 2193 ms
mounted file system
reading config file
opened config file
{
"tracker_server": "10.10.10.165",
"tracker_port": "5555",
"tracker_protocol": "freepie",
"mpu9250": {
"AB0": -1.142944,
"AB1": -0.092163,
"AB2": -0.892395,
"GB0": 0.099237,
"GB1": 0.717557,
"GB2": 1.229008,
"MB0": 21.29602,
"MB1": 944.123,
"MB2": 125.2752,
"MS0": 1.102136,
"MS1": 0.621141,
"MS2": 2.071553
},
"zero": {
"yaw": 0,
"pitch": 0,
"roll": 0,
"x": 0,
"y": 0,
"z": 0
}
}has tracker location
Initializing MPU9250...
Scanning...
I2C device found at address 0x0C !
I2C device found at address 0x68 !
done
MPU9250 9-axis motion sensor...
MPU9250 is online...
x-axis self test: acceleration trim within : 1.9% of factory value
y-axis self test: acceleration trim within : 0.3% of factory value
z-axis self test: acceleration trim within : 1.2% of factory value
x-axis self test: gyration trim within : 8.6% of factory value
y-axis self test: gyration trim within : 11.2% of factory value
z-axis self test: gyration trim within : 0.7% of factory value
Using saved calibration.
MPU9250 initialized for active data mode....
AK8963 I AM 48 I should be 48
AK8963 initialized for active data mode....
DMP Ready!