Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Lars Englund
@larsenglund
Hmm, I have a strange power problem, I'm deep sleeping my esp and was seeing 0.1mA when in deep sleep but now it's suddenly jumped to 2.4mA when deep sleeping o_O
haven't changed the hardware and the software is quite minimal..
The harware is just a bare esp12f with 3x10k pull resistors
void blinkLed() {
  digitalWrite(2, LOW);   // Turn the LED on (Note that LOW is the voltage level
  delay(500);                      // Wait for a second
  digitalWrite(2, HIGH);  // Turn the LED off by making the voltage HIGH
  delay(500);                      // Wait for two seconds (to demonstrate the active low LED)
}

void setup() {
  Serial.begin(DEBUG_BAUDRATE);
  Serial.println("setup()");

  WiFi.disconnect(); 
  WiFi.mode(WIFI_OFF);
  WiFi.forceSleepBegin();
  delay(1);

  pinMode(2, OUTPUT);     // Initialize the LED_BUILTIN pin as an output

  blinkLed();
}

void loop() {
  Serial.println("delay");
  delay(4000);

  Serial.println("sleep 1");
  Serial.flush();

  blinkLed();blinkLed();
  ESP.deepSleep(5*1000*1000, WAKE_RF_DISABLED);//WAKE_RF_DEFAULT);//, WAKE_RF_DISABLED);
}
And here I was being unhappy with the 0.1mA I was seeing (due to the pullups i suppose?)
But 2.4mA is just too much!
Lars Englund
@larsenglund
Any thoughts on what I might have fubared?
Lars Englund
@larsenglund
Actually, on more careful inspection my esp only has a 10k pullup on ch_pd and a 10k pulldown on gpio2... I thought pullup on gpio0 and pulldown on gpio15 was required..
(the board I'm using is the top board of a Witty from which I desoldered the ams1117 regulator, LDR and RGB LED)
Dmitry Kireev
@kireevco
@igrr alright thanks. Crap.
Dmitry Kireev
@kireevco
@igrr this is very strange. on my machine it works fine, I can link against libmain.a... Are you sure environment is not passing something strange?
Keith Andrew Hill
@vic10us
How are callbacks done for MQTT? In nodemcu this seems to be a lot easier.
seems like timers in general are much more difficult in C than in NodeMCU too...
(lua)
andig
@andig
@igrr is it possible to enable the lwip debug output with the gcc-compiled version? The bug above has been fixed by @me-no-dev and stability has greatly improved but we're still seeing crashes that seem to happen after the _error callback has finished.
Dmitry Kireev
@kireevco
ah.got it, now wrong
@igrr ok,so... try it this way: get https://bintray.com/artifact/download/kireevco/generic/esp-alt-sdk-v1.5.0.262-macos-x86_64.zip and run ./xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc esp_iot_sdk_v1.5.0/lib/libmain.a -o /tmp/libmain.a -nostdlib -u call_user_start (relative path to the library)
or just try to use relative path to ~/e/esp_iot_sdk_v1.5.2/lib/libmain.a
Dmitry Kireev
@kireevco
@igrr Nevermind... Somerhing is wrong.
Ivan Grokhotkov
@igrr
@kireevco relative path doesn't seem to make a difference
(getting the same error)
Dmitry Kireev
@kireevco
yeah.. I'm looking into binutils... looks like LD thing
bidyutper
@bidyutper
@Makuna same here...ha
andig
@andig
I have an arduino ide question. I'd like to add a build script that converts some SPIFFS files into "production" mode. Unfortunately, arduino ide seems to insist on compiling everything in the project folder- include build script, node_npm folder etc. Can I force arduino to ignore files and folders in the build process?
Aditya Tannu
@AdySan
Another general Arduino IDE question: When I install an Arduino core from Baords Manager, on OS X, what folder does it get installed to?
Ivan Grokhotkov
@igrr
~/Library/Arduino15/packages/
Aditya Tannu
@AdySan
@igrr aha, thanks, was trying to figure out how to override boards manager installed core (arduino-nRF5) with latest git core.
seems like, <sketchbook>/hardware does take priority over installed one though
Stavros Korokithakis
@skorokithakis
hey guys, i got into a bootloop/crash loop
would that be because i inadvertently applied 5v to the esp earlier? :(
Angus Gratton
@projectgus
skorokithakis: possibly, but FWIW I've applied 5V to ESPs a few times without incident
Stavros Korokithakis
@skorokithakis
hmm, yeah, i thought so too, but this is odd
Stavros Korokithakis
@skorokithakis
nah, i keep getting watchdog reset
i can flash it fine, it just won't run for some reason
i keep getting a long memory dump, does anyone know what that's about?
Stavros Korokithakis
@skorokithakis
turns out the tx/rx connections weren't secure enough and data was getting corrupted
is there a way to parse a string like "10 20 30" to ints easily?
Michael Miller
@Makuna
atoi() three times?
Stavros Korokithakis
@skorokithakis
that would require me to also know where to split the string, though
i'm looking for something like sscanf, but that doesn't seem to exist
i see it in a branch @igrr wrote, but it doesn't seem to be merged
Michael Miller
@Makuna
what about strtok
Stavros Korokithakis
@skorokithakis
aha! that's what i need, thanks!
ugh, why is everything in C so cumbersome...
Stavros Korokithakis
@skorokithakis
can anyone tell me why this strtok code leads to an infinite loop? https://www.pastery.net/ydthje/
Martin Ayotte
@martinayotte
You could try to use sscanf() to do the parsing, I've used it under STM32, but I don't if used under ESP will bring additional gcc libs
Oupps ! I've already figured out that you've already figured out that libcreplacement didn't provide it ... But maybe some tiny replacement could be added to libcreplacement
Stavros Korokithakis
@skorokithakis
yes, but i don't know how :/
i hate having to spend one hour to do something so simple
i used strtok as above and it just hangs in an infinite loop