mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-24 19:42:27 +03:00
ESP.restart() doesn't work, typo fixes (#2216)
New FAQ item: ESP.restart() doesn't work Write up review / typo fixes
This commit is contained in:
committed by
Ivan Grokhotkov
parent
31a72cebb0
commit
dd1a7e91b8
@ -19,14 +19,14 @@ title: Frequently Asked Questions / Troubleshooting
|
||||
|
||||
### Introduction
|
||||
|
||||
You would like to use this Arduino library with ESP8266 and it does not perform. It is not listed among [libraries verified to work with ESP8266](../doc/libraries.md#other-libraries-not-included-with-the-ide). You could not find any evidence on internet that it is compatible.
|
||||
You would like to use this Arduino library with ESP8266 and it doesn't perform. It is not listed among [libraries verified to work with ESP8266](../doc/libraries.md#other-libraries-not-included-with-the-ide). You couldn't find any evidence on internet that it is compatible.
|
||||
|
||||
What are the odds to make it working?
|
||||
|
||||
|
||||
### Identify the Issues
|
||||
|
||||
Start with looking for the symptoms that it is not compatible with ESP8266. Ideally use example sketches provided with the library. Then list all the issues you are able to identify.
|
||||
Start with looking for all the symptoms that it is not compatible with ESP8266. Ideally use example sketches provided with the library. Then list all the issues you are able to identify.
|
||||
|
||||
You are likely to see one or more of the following:
|
||||
* Compilation drops errors
|
||||
@ -45,7 +45,7 @@ If library author is unable to provide support, then assess the chances of fixin
|
||||
|
||||
*Issue:* Compiler complains about usage of AVR registers (PORTx, PINx, TCR1A, etc).
|
||||
|
||||
*Solution:* Check if usage of registers is well localized in a few functions, try to replace GPIO registers usage with digitalRead/Write, timer registers usage with timerX_ functions. If usage of AVR registers happens all over the code, this library might not be worth the effort. Also may be worth checking if someone got the library working on ARM (Due/STM), PIC, etc. If this is the case, maybe there already is a version of the library which uses Arduino APIs instead of raw registers.
|
||||
*Solution:* Check if usage of registers is well localized in a few functions, try to replace GPIO registers usage with digitalRead / digitalWrite, timer registers usage with timerX_ functions. If usage of AVR registers happens all over the code, this library might not be worth the effort. Also may be worth checking if someone got the library working on ARM (Due/STM), PIC, etc. If this is the case, maybe there already is a version of the library which uses Arduino APIs instead of raw registers.
|
||||
|
||||
*Issue:* Compiler complains about ``` <avr/pgmspace.h> ```.
|
||||
|
||||
@ -71,14 +71,14 @@ To troubleshoot resets follow FAQ item [My ESP crashes running some code](a02-my
|
||||
|
||||
*Solution:*: Check the usage of `int` type in the library. On AVRs integers are 16 bit, and on ESPs they are 32 bit (just like on ARM).
|
||||
|
||||
*Issue:* Some device with time critical control like a servo drive or a strip pf LEDs does not operate smoothly and tends to randomly changes position or displayed pattern.
|
||||
*Issue:* Some device with time critical control like a servo drive or a strip pf LEDs does not operate smoothly and tends to randomly change position or displayed pattern.
|
||||
|
||||
*Solution:*: Check for usage of interrupts that may get in conflict with Wi-Fi activity of ESP8266. You may temporarily disable Wi-Fi communication ``` WiFi.mode(WIFI_OFF); ``` to check if it helps.
|
||||
|
||||
|
||||
### Conclusion
|
||||
|
||||
Identify compatibility issues and ask library author for support. If left on your own then check for usage of controller's low level access functionality. Use [Esp Exception Decoder](https://github.com/me-no-dev/EspExceptionDecoder) if confronted with exceptions / watchdogs resets.
|
||||
Identify compatibility issues and ask library author for support. If left on your own, then check for usage of controller's low level access functionality. Use [Esp Exception Decoder](https://github.com/me-no-dev/EspExceptionDecoder) if confronted with exceptions / watchdogs resets.
|
||||
|
||||
The good news is that the number of libraries which aren't supported on the ESP8266 is shrinking. Community of ESP8266 enthusiasts is growing. If you are unable to resolve the issues yourself, there are very good odds that you will be able to find somebody else to help you.
|
||||
|
||||
|
Reference in New Issue
Block a user