hero_common
hero_common copied to clipboard
WheelEncoder.h causing reset on ESP8266
My team and I have debugged the firmware on the 2.6 board down to the include statement on WheelEncoder.h. Here is the error we are getting if that helps:
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 3460, room 16
tail 4
chksum 0xcc
load 0x3fff20b8, len 40, room 4
tail 4
chksum 0xc9
csum 0xc9
v000476d0
~ld
we know that the ESP is getting enough power ~4.9V. We assume that the issue stems from within the file where these lines are included:
#include <Encoder.h> /* https://github.com/PaulStoffregen/Encoder */
#include <SimpleKalmanFilter.h> /* https://github.com/denyssene/SimpleKalmanFilter */
We know that the bots aren't the issue because we are able to flash all of the sketches in the firmware/examples directory, as well as the demos that are included with the ESP including turning the bot into a wifi access point.
could this be an issue with the library location? Any help is extremely appreciated!
EDIT By going into the Encoder.h file supplied by Paul Stoffregen and adding ICACHE_RAM_ATTR to all static void ISR lines i.e
static void sr34(void) { update(interruptArgs[34]); }
----->
static void ICACHE_RAM_ATTR isr34(void) { update(interruptArgs[34]); }
the robot now has two red blinking LEDs when we turn it on and covering IR sensors for setup mode does not work.
EDIT 2.0 Changing the default mode for the robot in the firmware.ino to
config_mode = 1;
we are able to get the robot into config mode on startup.