Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By juanmanuel85
#80050
QuickFix wrote:The Adafruit library should be compatible with the ESP8266, but there were some problems with it in the past.
Make sure you use the latest version from repository, where this bug is fixed. :idea:

Also best practice is to use a simple and small as possible demo as a starting point to see where things go wrong, like trying any of the examples that come with a library; a lot of times a bug isn't inside the code you expect it to be in.

thanks for your reply, yes ive also try printing barcodes of an adafruit library example and stops in the middle as well :S
User avatar
By juanmanuel85
#80059
schufti wrote:Hi,
I miss two general items in your sketch:
a) key debounce
b) semaphor that you allready are serving a print request

as the esp8266 is n-times faster compared to arduino (empty loop() is called several times per ms), it is most likely that with one button press you run into print routine several times and esp crashes due to stack overrun or similar.
First implement a lockout to avoid cascading print calls, then - if necessary - look for key debounce. Sometimes HW debounce is sufficient (10nF cap parallel to button).


Hi, this is what i get from serial monitor,whats going on?
Code: Select all>>>stack>>>
3ffefab0:  00000001 00000000 3ffee7fc 40202222 
3ffefac0:  3ffee7d8 0000000a 3ffee7d8 4020224c 
3ffefad0:  3ffee7d8 00000000 3ffe8910 402031ec 
3ffefae0:  00000001 00000015 3ffe8871 3ffeeb30 
3ffefaf0:  3fffdad0 00000016 3ffee7d8 40202b5d 
3ffefb00:  3ffe8910 3ffe8858 3ffee7d8 40202b5d 
3ffefb10:  3ffe885c 00000001 3ffee7d8 40202b88 
3ffefb20:  3fffdad0 3ffe8858 3ffee7d8 40202bac 
3ffefb30:  feefeffe 3ffe8858 3ffee7d8 40202123 
3ffefb40:  feefeffe 00000000 3ffeeb28 40202fcc 
3ffefb50:  feefeffe feefeffe 3ffeeb40 40100710 
<<<stack<<<