I have started working with the BiBoard. I will be having it communicate with AWS over MQTT using certificates and the WiFiClientSecure MQTTClient packages. However, once I start to use those packages, either/both the DMP (IMU) fails with - DMP Initialization failed (code 1) or the BLE code in OpenCat makes the packages inoperable.
I have tried to gut any BLE code from the source and have gotten a little success, but the IMU is still not working well. Is there an easy to get simply not use the modem functionality in OpenCat to reduce any chance of conflict? Why would using WiFi kill any functionality?
Side note: The MU camera is at address 0x50, not 0x60! I don't know why you changed it from the reference design you link to in the documentation. I was about to return it. You really need to update the documentation to point this out, since you reference the stock design and code.
Here is the serial output:
k
Flush the serial buffer...
* Start *
B230305
Bittle
Scanning I2C network...
- I2C device found at address 0x50 ! <-- MU camera
- I2C device found at address 0x54 !
- I2C device found at address 0x68 !
- done
Initializing MPU...
OK
- Testing MPU connections...attempt 0
- MPU6050 connection successful
- Initializing DMP...- DMP Initialization failed (code 1)
7 network(s) found:
1. xxx
2. xxx
3. xxx
4. xxx
5. xxx
6. xxx
7. xxx
Connecting to xxx.Wi-Fi connected!
Setup ESP32 PWM servo driver...
Build skill list...59
TaskQ
Ready!
AWS IoT Connected!
g
d
My Wifi code is very generic, mostly taken from the example sketches, using private key, cert and rootCA for auth with AWS IoT. I have it in a TaskHandle assigned to core 0, so that I can use it on a different core than the main loop (core 1).
When it does work, it sometimes crashes are restarts the ESP32, or doesn't actually move, or the servos go crazy... Quite random honestly. I have tried the Wifi code in a task, without task (but kills any responsiveness of the servos)... The only way to get wifi working perfect is to not import OpenCat.h, or to get the servos to work, to simply not import the Wifi modules...
Hi,
For the IMU, have you modified the file as described in the setup guide?
If IMU is unimportant in your application, you can disable it in src/OpenCat.h:
ESP32 can support WiFi and BLE, but making them work together takes more effort.
WiFiClientSecure MQTTClient is an ESP32 library for generic use. As a robotics product company, we adjust and integrate many modules to make them work within our robot. We can not predict if there are any conflicts with other libraries in 3rd party projects. Since you reported this case, we may find a fix or add macros to turn on/off specific modules in the future.
We are a small client of the camera manufacturer. They have an alternative address for their primary customer. We have added an automatic connection routine in our example code to connect either address. You can activate the #define CAMERA line in the OpenCatESP32.ino to see its effect. The source code is in OpenCatESP32/src/camera.h.
The standard firmware has a random behavior for the robot. You can turn it off in src/randomMind.h.