@skorokithakis I have a quick question for you if you don't mind.
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?
hmm, does the feather have an ESP?
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 -.-
not sure man :/ should have gotten a huzzah
Sold out wouldn't have fixed my gap =(
Any idea why the MQTT is disconnecting? Is there a keepalive or loop I should be running?
have a look at my library above, it has a working mqtt example
there's a loop afaik, yeah
Keith Andrew Hill
Why doesn't ESP need the loop method? I thought you could make everything event driven like in LUA?
I meant DOES
not sure how lua works :/
Keith Andrew Hill
Isn't the ESP multithreaded?
not that i know of
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.
@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
@igrr@me-no-dev a solution has been found for the NMI problem! :smile: larsenglund/esp8266_arduino_nmi_timer#1
@tzapu What do you mean? That's literally all it does.
@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
@larsenglund nice find! elegant solution as well :)
sticilface are you maybe also active on irc somewhere? or just gitter
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:
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.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
so is it possible to use the NMI timer with arduino? I tried a while back but was never successful.
@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).
@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.