Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
tzapu
@tzapu
i couldn t get it to work with @ficeto pull request, but it worked just fine with the adafruit1306 lib he modified before
this is what i use
ficeto
@ficeto
will find what's wrong, now that I can see it :)
there is nothing in the code that suggests the behavior I'm seeing
ficeto
@ficeto
actually that was dumb on my end... should call lcd.display()
the lib as it is in the repo is working fine on my end
ficeto
@ficeto
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 lcd(-1);

void setup() {
  lcd.begin(SSD1306_SWITCHCAPVCC, 0x3C);
}

void loop() {
  lcd.clearDisplay();
  lcd.setTextSize(1);
  lcd.setTextColor(WHITE);
  lcd.setCursor(0,0);
  lcd.print("Heap: ");
  lcd.println(ESP.getFreeHeap());
  lcd.print("Time: ");
  lcd.println(millis() / 1000);
  lcd.display();
  delay(100);
}
tzapu
@tzapu
good to know, thanks
if i m reading and writing eeprom in a lib, what would be a good practice , eeprom.begin and eeprom.end at the start and end of my functions? in case there are other eeprom operations in the main app?
ficeto
@ficeto
well... what end does is to commit the data in the buffer to the flash chip. You can open the EEPROM in the beginning of the sketch and just use EEPROM.commit() when you change something.
That will ensure that the data is saved n the flash
Russ Mathis
@RussMathis
Can someone help with the reset pin? I'm calling ESP.deepSleep and watching the rst & 16 pin. When awake I blink an led. Sleep for 5 sec Wake for 5 secs.
When I watch the scope it seems to indicate a pwm on rst&16? What is the proper way to wake if I want to override the deepSleep?
I want to sleep for 5 minutes but if the light in a room comes on I want to ake. Do I pull rst down or raise it high? Confused since the scode seems to show a pwm when in sleep mode :worried:
ficeto
@ficeto
have no clue what pwm you are seeing, but i have tied pins 16, EN and RST together and pulled UP with resistor
to wake manually, i pull the pins down
tzapu
@tzapu
@ficeto i m using eeprom in a lib, what happens if both the main app and the lib do eeprom.begin?
Russ Mathis
@RussMathis
Currently I have 16 and reset connected together(No resistor). When the ESP is in sleep mode I put the scope on either the 16 or gnd and see a sinus wave.
Not familiar with scope well enough yet LOL. Just got it and started using it.
ficeto
@ficeto
@RussMathis pul those pins UP! EN pin also!
Russ Mathis
@RussMathis
What is the EN pin?
ficeto
@ficeto
@tzapu if whatever opened the EEPROM first made any changes to it and did not commit(), those will be gone
CH_PD
tzapu
@tzapu
cool, cheers
Russ Mathis
@RussMathis
I don't see a reference in the PIN table to the EN pin?
ficeto
@ficeto
@RussMathis CH_PD is the EN pin
Russ Mathis
@RussMathis
remember I'm a newb LOL
OK, thanks, why is it called EN?
ficeto
@ficeto
i'm more in question why is it called CH_PD
EN comes from ENABLE
maybe CH_PD is Chip_PowerDown
tzapu
@tzapu
or this is hangman and CHPD_
ficeto
@ficeto
:D
tzapu
@tzapu
hmm, it eat my underscores
Russ Mathis
@RussMathis
LOL
tzapu
@tzapu
not a very good joke afterwards
:P
(probably not very good before either)
ficeto
@ficeto
it was actually good at least to me :D had a laugh
@tzapu I'll probably never look at acronyms with underscores the same way again... it's your fault now! :D
Russ Mathis
@RussMathis
So the rst pin goes high when in sleep mode, then goes low while chip is not sleeping... That's what the scope seems to indicate. While sleeping if I connect rst to ground it wakes... cool!
ficeto
@ficeto
RST and CH_PD need to always be pulled up by e resistor
i prefere having them tied together and pulled with one resistor
you control their level
should never ever have them floating
Russ Mathis
@RussMathis
Currently I'm only connecting 16 & rst and it seems to run ok. Why pull up?
ficeto
@ficeto
as that will lead to unpredicable restarts
pulled up because they are active low pins
Russ Mathis
@RussMathis
ahhh, OK, with 10K or 1000K
ficeto
@ficeto
1K-4.7K
that makes sence to name the CH_PD pin since on low the chip is powered down
and RST on low resets the chip