You are browsing as a guest. Sign up (or log in) to start making projects!

13h 17m 48s logged

Devlog 3: Final touches to the software

I’ve finished the part I like the least (I like them all, but this is the one I like the least :sweatdrop: ), which is the programming and getting everything ready to tackle the most interesting part of the hardware.


I’ve been pretty busy these past few days, so I’ve made only minor progress, but I finally finished the following:

  • The interface is now much nicer and easier to understand, since the structure has been completely overhauled and the design has been streamlined (Claude might have had something to do with that :bleh: ).Now with 🆒 graphs!

  • I’ve reviewed the :c++: code for the ESP32 and fixed some security issues related to Wi-Fi credentials. I’ve also optimized some parts responsible for handling the web interface data, with a little help since I’d never done this before. :glorped:

  • Now, since the web interface is much more resource-intensive, it’s not directly embedded in the C++ code that’s compiled onto the ESP32, which saves memory and frees up space for other, more important processes.

Here’s an example of how I’ve been doing it so far:

//Cpp stuff//

const char HTML_PAGE[] PROGMEM = R"rawhtml(

  <!DOCTYPE html><html>
    <title>Amazing HTML page</title>
    <body>
      <h1>Incredible Title</h1>
      <p>Wonderful Paragraph.</p>
    </body>
  </html>

)rawhtml;

//Rest of the code//

Now, instead, I have the three files: index.html, style.css, and scrypt.js, and I use PlatformIO (the same tool used for Marlin firmware on 3D printers :yip: ) to save them directly to the ESP32 without needing to compile them with the rest of the code.

  • There is now also an offline version. The ESP32 tries to connect to the last Wi-Fi network it was connected to, and if that network doesn’t exist or it’s the first time it’s connecting, you can enter new credentials. If it goes a certain amount of time without connecting to any network, it switches to offline mode and is controlled entirely by hardware.

To complete the project (or at least the items on my to-do list) I need to do the following:

  1. Demonstrate a proof of concept showing how the cat litter is used in the project (which is one of the project’s key features, and I haven’t done anything with it yet ) :emoji-staring-from-the-dark:
  2. Write a proper README to make it easier to use
  3. Make the GitHub repository public so you can test it
  4. Make the hardware even easier to use by reducing the controls to two buttons
  5. Design the parts to be printed and put everything together

I think that’s it… I’m going to keep doing it my own way until I finish it, but if anyone is interested, I’d be happy to tell them or do whatever they ask of me!

0
2

Comments 0

No comments yet. Be the first!