Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Stavros Korokithakis
@skorokithakis
sure
geman220
@geman220
So I wanted to get started on at least prototyping the MQQT servo project. I ordered a WICED Feather on Amazon and it got here today. Adafruit's website says "You write your code in the Arduino IDE using the same standard libraries you've always used (Wire, SPI, etc.), compile locally, and the device is flashed directly from the IDE over USB." Except it doesn't support Servo.h....... Anyway, I got MQTT to work and I can do a simple test to have it Serial.print a message depending on what is posted to the broker. I actually have 2 questions. 1) For some reason this program is just eventually disconnecting from the MQTT broker and I have to reboot the device to have it connect again. 2) Whenever I can actually get a servo hooked up, it should just be as easy as replacing the Serial.print with the servo infromation, correct?
Stavros Korokithakis
@skorokithakis
hmm, does the feather have an ESP?
geman220
@geman220
No it doesn't but I was just using it as a stop gap to try and hammer out the code and functionality so when my ESPs get here I can just load up some code (save a few changes).
I specifically looked for something that claimed to support all default libraries... I'm getting very fed up with Adafruit for a few reasons -.-
Stavros Korokithakis
@skorokithakis
not sure man :/ should have gotten a huzzah
geman220
@geman220
Sold out wouldn't have fixed my gap =(
Stavros Korokithakis
@skorokithakis
ah :/
geman220
@geman220
Any idea why the MQTT is disconnecting? Is there a keepalive or loop I should be running?
Stavros Korokithakis
@skorokithakis
have a look at my library above, it has a working mqtt example
there's a loop afaik, yeah
Keith Andrew Hill
@vic10us
Why doesn't ESP need the loop method? I thought you could make everything event driven like in LUA?
I meant DOES
Stavros Korokithakis
@skorokithakis
not sure how lua works :/
Keith Andrew Hill
@vic10us
Isn't the ESP multithreaded?
Stavros Korokithakis
@skorokithakis
not that i know of
Michael Miller
@Makuna
Arduino is not multithreaded, and this is an Arduino environment. If you want "true" multithreaded support you won't be working in Arduino. If your Ok with "non-preemptive" and want to remain with Arduino, I have a task library (github/makuna/task) that is cross Arduino supported and I also believe the included Ticker library also provides similar functionality.
@vic10us Don't confuse a hardware platform (Esp8266) with a Dev Environment (Arduino).
Event Driven doesn't mean multithread either. Generally "async" programming models are "event driven" models. While most Arduino libraries or features are not "async" due to historic reasons around complexity and target audience of Arduino, with a little work they could be. I personally prefer async.
tzapu
@tzapu
@skorokithakis you know what would look nice in your boilerplate? WiFiManager to handle all the wifi configuration, maybe mqtt server, ntp server as well at setup time :D
Lars Englund
@larsenglund
@igrr @me-no-dev a solution has been found for the NMI problem! :smile: larsenglund/esp8266_arduino_nmi_timer#1
Stavros Korokithakis
@skorokithakis
@tzapu What do you mean? That's literally all it does.
sticilface
@sticilface
@Makuna that makes a lot of sense. And maybe why I was still getting variable sizes just using standard sizes. Will report back. Thanks.
Me No Dev
@me-no-dev
@larsenglund nice find! elegant solution as well :)
marksev1
@marksev1
sticilface are you maybe also active on irc somewhere? or just gitter
fmgomes
@fmgomes
I have a project working with previous esp/arduino version 2.1.0, that to save battery enters in power down mode using the CH_PD pin, waking up through an external signal that is connected to the CH_PD. This is working well, but now I've upgraded to esp/arduino version 2.2.0, and it isn't working anymore, when the signal connected to the CH_PD pin apear, it enters in programming mode if using the latest V2.2.0, but starts in normal mode if using V2.1.0. Was there any change that might trigger this different behavior? GPIO0 has a pull-up resistor (and a push button connected to ground that I press to put in programming mode when neessary)
The message I get in the serial port at 76800 bps now with version 2.2.0 is the following:

ets Jan 8 2013,rst cause:1, boot mode:(3,7)

load 0x4010f000, len 1264, room 16
tail 0
chksum 0x0f
csum 0x0f
~ld

fmgomes
@fmgomes
Updating my last message, I was wrong saying that it was booting in programming mode. But nevertheless it is not booting well, and one thing I observe is that with version 2.1.0 I see: ets Jan 8 2013,rst cause:1, boot mode:(3,6)
and with version 2.2.0 I get: ets Jan 8 2013,rst cause:1, boot mode:(3,7)
Is there any documentation about the meaning of the second digit in the boot mode message?
Full boot message with version 2.1.0:

ets Jan 8 2013,rst cause:1, boot mode:(3,6)

load 0x4010f000, len 1264, room 16
tail 0
chksum 0x42
csum 0x42
~ld

Full boot message with version 2.2.0 (exactly the same software and the same hardware):
ets Jan 8 2013,rst cause:1, boot mode:(3,7)
load 0x4010f000, len 1264, room 16
tail 0
chksum 0x0f
csum 0x0f
~ld
Theb-1
@Theb-1
so is it possible to use the NMI timer with arduino? I tried a while back but was never successful.
bobcroft
@bobcroft
@fmgomes I too have seen the varying boot mode:(3,7 and 3,6) and that was using version 2.1.0. Whilst the cause or reason for the 3 is explained in numerous places on the web, I have never found the reason or cause of 3.6 or 3.7. It woould be good if anyone could clarify what the 6 or 7 means, I believe 7 is the correct one for a trouble free boot up and for the program to run properly i.e. bootmode: (3,7).
tzapu
@tzapu
@skorokithakis wifimanager would give you a configuration portal, so you don t need to hardcode the values in the config file. ssid/pass and other custom params you might need.
Stavros Korokithakis
@skorokithakis
Hmm, I've never used it, do you have an example?
see this example
you can add custom params and save it to a json in fs
been meaning to do one for eeprom for ages, but my hobby time got shot in the leg, twice, in the last few weeks
Helio Machado
@0x2b3bfa0
@me-no-dev: https://github.com/me-no-dev/ESPAsyncWebServer: I'm having a WDT reboot when serving empty file from SPIFFS. Please confirm me that is not a layer-8 error.
Me No Dev
@me-no-dev
you mean 0 bytes file?
do you get a stack trace?
Helio Machado
@0x2b3bfa0
@me-no-dev: Yes. Pasting...

Exception (2):
epc1=0x3ffe884c epc2=0x00000000 epc3=0x00000000 excvaddr=0x3ffe884c depc=0x00000000

ctx: sys 
sp: 3ffffa00 end: 3fffffb0 offset: 01a0

>>>stack>>>
3ffffba0:  00000000 00000080 00000000 00000f23  
3ffffbb0:  00000002 3ffffc0e 40205808 00000000  
3ffffbc0:  00000002 3ffffc1e 00000020 00000020  
3ffffbd0:  00000001 3fff3d00 3fff09d8 40204839  
3ffffbe0:  00008001 000000f8 ffffffff 6f632f01  
3ffffbf0:  2e736564 00000004 3ffffc50 3ffffc61  
3ffffc00:  4010676c 00000000 3fff3c72 00000010  
3ffffc10:  3fff3af4 00000001 000000a5 00300000  
3ffffc20:  00002000 00000000 00000000 3ffffbb0  
3ffffc30:  3fff1ecc 3ffffc8e 3fff3c80 3fff09d8  
3ffffc40:  3ffffc60 3ffffc50 00000004 3ffffd0c  
3ffffc50:  00000010 3ffe8918 3fff3c72 00000000  
3ffffc60:  000000a5 ff000000 3ffffd0c 402116f9  
3ffffc70:  3fff0a70 000005b9 000005b9 40203a01  
3ffffc80:  3fff0a70 00002fa0 3fff0a70 40203b06  
3ffffc90:  000000a0 3fff3e64 3fff3dcc 40203c13  
3ffffca0:  00000020 00000000 00000010 40203d9e  
3ffffcb0:  00000094 00000001 3ffffd10 402116f9  
3ffffcc0:  3ffe8f22 00000000 3ffffd10 4021174e  
3ffffcd0:  3ffe8f20 3ffffd60 3ffffd10 4021177e  
3ffffce0:  00000000 3fff3bdc 3ffffd10 402117cc  
3ffffcf0:  3ffe8f22 00000000 000000a2 40203db4  
3ffffd00:  00000000 00000000 00000096 4020c777  
3ffffd10:  00000000 00000000 00000000 402038e4  
3ffffd20:  00000001 3fff3b24 3fff3c4c 40203fa0  
3ffffd30:  3fff3474 3fff3e64 3ffffd60 40211844  
3ffffd40:  00000010 3fff3474 3fff3b24 3ffffe0c  
3ffffd50:  00000001 3fff3474 3fff3af4 4020c1f4  
3ffffd60:  00000000 00000000 00000000 00000000  
3ffffd70:  00000000 3fff09cc 3fff3474 4020b584  
3ffffd80:  00000001 3fff09cc 3ffffdb0 40211880  
3ffffd90:  00000010 00000000 3fff3474 3ffffe0c  
3ffffda0:  00000001 3fff09cc 3fff3474 4020b600  
3ffffdb0:  3fff39e4 0000000f 00000000 3fff39c4  
3ffffdc0:  0000000f 0000000a 3ffffe00 4021177e  
3ffffdd0:  3ffffe00 3fff3474 3ffffe00 402117cc  
3ffffde0:  3ffe8f22 3fff3474 3ffffe00 00000149  
3ffffdf0:  3ffeb3c8 3fff3474 3fff3474 402101eb  
3ffffe00:  3fff3754 0000000f 00000000 3fff3734  
3ffffe10:  0000000f 0000000a 3fff3a0c 40203fa0  
3ffffe20:  00000000 00000000 3fff3474 4020d4d5  
3ffffe30:  00000000 00000001 3fff3488 4021174e  
3ffffe40:  3ffe8f22 3fff3474 3fff3488 00000147  
3ffffe50:  3ffeb3c8 0000014a 3fff3474 4020ba78  
3ffffe60:  3ffeb3c8 0000014a 3fff3474 40211b98  
3ffffe70:  00000037 014e50f1 3ffffeb0 402014e0  
3ffffe80:  3ffeb3c8 0000014a 3fff3474 4020bade  
3ffffe90:  00000000 00000000 3fff3474 4020bc9f  
3ffffea0:  000000e8 00000000 3fff3474 4020c048  
3ffffeb0:  3fff0a70 000004de 000004de 402038e4  
3ffffec0:  3fff0a70 0000038c 0000038c 402038e4  
3ffffed0:  00000020 3ffee704 3fff2894 3fff251c  
3ffffee0:  3fff326c 00000000 3fff33b4 4020be6d  
3ffffef0:  3fff0a70 0000031c 3fff33b4 4020a06d  
3fffff00:  3fff3408 00000000 3fff2514 40221599  
3fffff10:  4022261e 3fff326c 3ffee704 3ffee6e0  
3fffff20:  3ffee704 00000000 3fff326c 4020a0db  
3fffff30:  402220dd 3fff326c 00000000 402221db  
3fffff40:  967e5a39 00001971 0000014a 00000018  
3fffff50:  00000000 0000014a 4022103e 3fff251c  
3fffff60:  3fff113c 3ffeb3a0 3fff113c 4022037f  
3fffff70:  3fff113c 00000014 4022092a 3fff251c  
3fffff80:  3fff113c 3fffdc90 3fff11dc 00000001  
3fffff90:  4021c40b 3fff251c 00000000 4020155f  
3fffffa0:  40000f49 3fffdab0 3fffdab0 40000f49  
<<<stack<<<
Me No Dev
@me-no-dev
use this to decode it