So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By rick2nd
#72507 .....i haven't read the thing "on running for a year"....the only way i can imagine to do it is to have timer wake it up once a day and say "hello world" then sleep again........only so much "energy" in them disks,..and if you squeeze it out too fast, well---you get to face reality...

....could anyone please help me on just getting a esp8266-01 working on the standard uart tx and rx..gets pretty technical on hardware and software and terminal specific issues....

thanks
User avatar
By Zachrey
#72571 The CR2016 is too small to run the ESP-12E for any length of time and probably cannot deliver the 300mA that the ESP8266 may need at times.

I would recommend maybe a couple of 18650 Li-Ion cells. They can certainly deliver the amps you need and can have anywhere from 1,500mAh to 3200mAh (compared to 90mAh for the CR2016) which should keep you running for a little while.
User avatar
By liderbug
#72661 Well, I think the phrase is "I think I've got it.". Rural mailbox, on the bottom front of the box a pushbutton NC, when the door is closed it presses against the button, when the door opens one side, gnd, connects to 8266 pin 1, Rst.
Code: Select all #include <ESP8266WiFi.h>
#include <Ethernet.h>
#include "Gsender.h"

byte mac[] = {0x61, 0x02, 0x93, 0x34, 0x25, 0x86};
IPAddress ip( 192, 168, 0, 33 );
IPAddress gateway( 192, 168, 0, 1 );
IPAddress subnet( 255, 255, 255, 0 );
const char* ssid = "MyCaseSensSSID";
const char* password = "mysecret";

void setup ()
{
  delay (1000);
  pinMode(2, OUTPUT);
  blink (2);
  Ethernet.begin(mac, ip, gateway, gateway, subnet);
  delay(1000);
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
  }
  blink (4);
  String mytxt = "The Postman Always Rings Twice, a\n";
  Gsender *gsender = Gsender::Instance();   
  gsender->Send("7191234567@vtext.com", mytxt);
  blink (1); delay (1000);
  blink (1); delay (1000);
  blink (1); delay (1000);
  ESP.deepSleep(-1);
}

void loop ()
{ // should never get here
  blink (1); delay (1000);
  ESP.deepSleep(-1);
  delay (1000);
}

void blink (int cnt)
{
  for (int n=0; n<cnt; n++)
  {
    digitalWrite(2, LOW);
    delay (200);
    digitalWrite(2, HIGH);
    delay (200);
  }
}


Rst causes a reboot, connects to router, sends text msg, and DeepSleepsForever.
I'm using a 30,000ma powerbank w solar cell. It has (had) 4 LEDs showing battery level. I took my clippers to 3 of the 4 LEDs to cut down on current draw. BTW the smail showed up at 3:18 PM today.

Thanks to everybody who helped me get here. :D