These are chat archives for esp8266/Arduino

30th
May 2015
chad cormier roussel
@chadouming
May 30 2015 02:20
Lol
I want it to be crashing while running my program
chad cormier roussel
@chadouming
May 30 2015 06:17
well, the good news is that my battery seems to not drain at all with deep sleep
which is a good thing
now, that it doesnt crash, that is sad
Me No Dev
@me-no-dev
May 30 2015 11:12
having this really strange issue here with analogRead
here is my dead simple sketch
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 lcd(-1);

void setup() {
  Serial.begin(74880);
  Serial.setDebugOutput(true);
  lcd.begin(SSD1306_SWITCHCAPVCC, 0x3C);
  Wire.setClock(400000);
  lcd.display();
  delay(1000);
}

uint32_t turn = 0;

void loop() {
  uint32_t heap = ESP.getFreeHeap();
  uint16_t analog = analogRead(A0);
  lcd.clearDisplay();
  lcd.setTextSize(2);
  lcd.setTextColor(WHITE);
  lcd.setCursor(0,0);
  lcd.print("RAM:");
  lcd.println(heap);
  lcd.print("A0: ");
  lcd.println(analog);
  lcd.print("TURN: ");
  lcd.println(turn++);
  lcd.display();
  delay(1000);
}
I do not have any WiFi calls here
but as soon as the settings that are already in get the WiFi to connect
i get wdt reset
if I remove analogRead(A0)
the sketch runs fine
Me No Dev
@me-no-dev
May 30 2015 11:22
disabing WiFi on boot helped
so I guess calling it while WiFi is connecting yields reset
Russ Mathis
@RussMathis
May 30 2015 13:56
To everyone, VisualMicro has new update today May 30.
VisualMicro update fixed intelisense. Yhea!
Me No Dev
@me-no-dev
May 30 2015 14:29
found the problem with the new SDK and analogWrite
timer1 interrupt can not be cleared
which has nothing to do with the SDK
so why is this happening?
Michael Miller
@Makuna
May 30 2015 16:55
@RussMathis I have found visual micro fails to smartly rebuild when I modify a library, to the point that I have to remember to always hit red build all to even get it too work.
@me-no-dev what do you mean by timer not being cleared? It fires only once du to not clearing the pending field? Or that it continues to fire even though you have called disable?
Me No Dev
@me-no-dev
May 30 2015 16:58
it can ot clear the interrupt flag
interrupt flag stays on and if the edge interrupt is enabled again
wdt resets
Russ Mathis
@RussMathis
May 30 2015 17:41
@Makuna , there is an option to build all everytime. VS, by default, only builds the external files to your project once. After that I guess it only checks the file stamps on the project files.