Giter VIP home page Giter VIP logo

Comments (4)

chunkysteveo avatar chunkysteveo commented on May 27, 2024 1

No, it's not game over... you have a delay in there of a second, and the boot up from sleep also takes some time. The quick way will just be a case of trying to upload your sketch to the board, and timing the off/on right so it (the USB 2 Serial chip) catches the ESP8266 in it's boot up and sketch loading state. What revision board do you have? You're not going to damage the chip or board, just keep pressing upload, and trying different timings from when you can see the Arduino IDE compiling and turning the badge off and on. Unplugging the USB from your computer may be easier than fiddling with the slide switch too.

A longer and harder way would be to manually upload some code to the ESP8266 using some Dupoint cables and connecting up power, ground, RT, TX and setting the GPIO appropriatley. But you would need an external serial programmer, even a spare Wemos D1 mini or Node MCU would do. As you have spotted in your link, the pins would need to be:

UART Download Mode (Programming): GPIO 0 - LOW, GPIO 2 - HIGH, GPIO 15 LOW.

This will force the chip into programming mode when you power it up and you are not relying on the Badgy USB2Serial chip catching it in time. Then you can upload at your leisure.

Steve

from badgy.

chunkysteveo avatar chunkysteveo commented on May 27, 2024 1

sorted??

from badgy.

chunkysteveo avatar chunkysteveo commented on May 27, 2024

Have you kept the OTA Sketch upload part from the example sketches? This is where you hold down the centre button of the joystick to get it into upload mode from a web interface. If you do that, it will keep the ESP8266 alive while it waits you to upload a BIN file. Ignore that, but now the ESP8266 is no longer running the sketch so will be able to be flashed. Can you post your whole code to this to see at what point you have added the sleep part?

from badgy.

liorbp avatar liorbp commented on May 27, 2024

Unfortunately, I didn't keep the OTA Sketch upload section (as I said, stupid).
The sketch was something like the below code... is it game over to my badgy? :(

GxIO_Class io(SPI, SS, 0, 2);
GxEPD_Class display(io);

void setup()
{
  Serial.begin(115200);
  display.init();
  myfunc();
}

void loop()
{
}

void myfunc()
{
  delay(1000);
  ESP.deepSleep(1 - 1000000UL);
}

from badgy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.