Closed willgraham345 closed 1 year ago
Hi @willgraham345,
Sorry for the late reply! After a while, I was able to replicate this error.
I was using version 2.5.0 of the esp8266 board, and this error did not come out.
But when I upgrade it to version 3.1.0 and compile it again, when I check the serial output, I get the same error.
In fact, the solution was just to update the Encoder library to the most current version (1.4.1 -> 1.4.3). It could have been some internal modification in the esp8266 board that changed the way to implement interrupts, making the Encoder lib need updating.
I tested it here, and everything should work fine since that last commit in the hero repository.
EDIT 1.0:
It looks like the newest version of the Encoder library (> 1.4.1) has decided to remove GPIO 10 from the list of interrupt pins. This will cause problems reading the left encoder since we use this pin.
The version of the Encoder library in the hero repository has re-enabled this pin. If you want to use future versions of the Encoder lib (> 1.4.3), remember to check if this GPIO is enabled as an interrupt.
Regarding the configuration mode, it could be some problems with the IR sensor readings. The idea we use as a switch is if all IR readings are greater than TOUCH_THRESHOLD
, then the robot should go into configuration mode (blinking pink light). Otherwise, it enters the ROS communication mode. Red blink light (searching for an access point). When connecting to the access point, the light blinks blue and stops. At that moment, it is already possible to connect with the robot by executing the launch file, hero_bringup.launch
.
/* firmware.ino */
/* Cover all the range sensor to enable web config mode */
config_mode = rangeSensor.configModeCheck();
/* Clean status led */
ledStatus.reset();
if (config_mode) {
/* Create an AP that enables the user to setup some parameter of the robot. See config_via_wifi.h. */
webConfig.init(ledStatus);
}
else {
/* Setup ROS Communication */
Please let me know if you were able to fix these both issues. Best, Rezeck
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:
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:
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
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
we are able to get the robot into config mode on startup.