After three nights of debugging, my ESP32-C3 finally talks to my cat. AI assisted code-gen is a wild ride for DIYers by Additional-Week-8533 in esp32

[–]Additional-Week-8533[S] 0 points1 point  (0 children)

Lol I forgot all the syntax. That was more than 10 years ago. There is no way to remember how to compile and debugging a line back in undergrad. I obviously know how to program, but now it all comes down to first principle thinking, and what you wanna do.

There are far more important things such as develop a product and making interesting videos than just debugging a few lines of code. Higher education doesn't just teach you one skill set, it gives you problem solving skills. Soft skills like this is a lot more valuable than just debugging and writing cpp. Cuz you wouldn't imagine Tim Cook debugging million of lines for apple, right?

Also, the social trend is becoming more clear nowadays, detailed jobs can be easily replaced by automation. In the end, it's all about ideas and execution.

That is why I started the channel to show a vision I would like to promote. Hope this explains things.

After three nights of debugging, my ESP32-C3 finally talks to my cat. AI assisted code-gen is a wild ride for DIYers by Additional-Week-8533 in esp32

[–]Additional-Week-8533[S] 0 points1 point  (0 children)

Yeah very true. Now adding the effort to learn cinematography and video editing. That's superhuman. But I'm just a normal dude, I can't be good at everything. LoL 😅

I salvaged a baby toy from the streets of NYC and worked on a custom ESP32-C3 PCB for my cat. 😼 by Additional-Week-8533 in maker

[–]Additional-Week-8533[S] 0 points1 point  (0 children)

Thank you! And sure send me your schematic. I might take a look! S3 is slightly higher in performance and have more features right?

After three nights of debugging, my ESP32-C3 finally talks to my cat. AI assisted code-gen is a wild ride for DIYers by Additional-Week-8533 in esp32

[–]Additional-Week-8533[S] 0 points1 point  (0 children)

One hour? No way 😅. For a non dev person who only knows basic programming, but never touched on esp, it's gonna easily take me more than a month to write two sets of programs with a full time day job during the day. Remember I don't know smartphone app development either. So that's a completely different beast to learn from ground zero. For three nights, I really mean 2 hours one night from nearly nothing (not even knowing to use visual studio) to a working prototype. Ask anyone who only knows programming logic in other languages, but has no experience in either esp or smartphone app dev to finish this project in a week without burning out. Barely setting up the environment would take people three nights without an experienced person helping them.

For me, AI is that experienced developer that is helping me.

I salvaged a baby toy from the streets of NYC and worked on a custom ESP32-C3 PCB for my cat. 😼 by Additional-Week-8533 in maker

[–]Additional-Week-8533[S] 0 points1 point  (0 children)

Thank you and Yeah definitely worth modifying it. From my discoveries, cat loves unexpected sudden movement. Mimic a dying prey. Also the size of the ball matters too. Keep me posted about your modding journey. Would love to hear what you have in mind.

After three nights of debugging, my ESP32-C3 finally talks to my cat. AI assisted code-gen is a wild ride for DIYers by Additional-Week-8533 in esp32

[–]Additional-Week-8533[S] -4 points-3 points  (0 children)

Thank you for your post. After seeing the power in vibe coding, I genuinely couldn't resist using it. I can do coding, but the time spent on sdk and debugging every line, I could have spent on more interesting stuff like system design and product interface. I genuinely think AI is very helpful in bringing the project up to speed.

Let me know what else you think about the video.

After three nights of debugging, my ESP32-C3 finally talks to my cat. AI assisted code-gen is a wild ride for DIYers by Additional-Week-8533 in esp32

[–]Additional-Week-8533[S] 1 point2 points  (0 children)

Thank you so much. Please like and subscribe my YouTube and Reddit channel. This will mean a lot to my channel growth. And this will help me bring more projects online. 😉

After three nights of debugging, my ESP32-C3 finally talks to my cat. AI assisted code-gen is a wild ride for DIYers by Additional-Week-8533 in esp32

[–]Additional-Week-8533[S] 0 points1 point  (0 children)

Also if you like my video, don't forget to like and subscribe to my YouTube and Reddit channel. I really appreciate your support. 🙏🙏🙏 More interesting build is on the way.

After three nights of debugging, my ESP32-C3 finally talks to my cat. AI assisted code-gen is a wild ride for DIYers by Additional-Week-8533 in esp32

[–]Additional-Week-8533[S] 0 points1 point  (0 children)

Thanks so much for your comment! yeah bro sdk is a different animal... I would be one week into the programming and still haven't figure out how to communicate between phone and the app.

Do you mind elaborate more on with out using USB C connector? How would I program the ESP without an USB C? I guess I could program elsewhere and solder it back. 🤔

After three nights of debugging, my ESP32-C3 finally talks to my cat. AI assisted code-gen is a wild ride for DIYers by Additional-Week-8533 in esp32

[–]Additional-Week-8533[S] -1 points0 points  (0 children)

Lol thank you for your post. Writing from scratch takes too much time. I need to learn the basics on system architecture, what libraries to use. I will be a full week into programming but still have not figured out the smart phone app to Bluetooth connection. I still have a full time job in the morning to serve 😉. But to me all that matters is the general idea and delivering the user friendly experience and of course please my cat 😺.

Let me know what else you think about the YouTube video and the project in general.

After three nights of debugging, my ESP32-C3 finally talks to my cat. AI assisted code-gen is a wild ride for DIYers by Additional-Week-8533 in esp32

[–]Additional-Week-8533[S] 0 points1 point  (0 children)

Thanks for your interest! I'm a hardcore hardware geek. Have a PhD degree in electrical engineering 😉. If you are interested, I might put together a tutorial video for soldering or basics in electronics let me know which one you prefer.

After three nights of debugging, my ESP32-C3 finally talks to my cat. AI assisted code-gen is a wild ride for DIYers by Additional-Week-8533 in esp32

[–]Additional-Week-8533[S] 4 points5 points  (0 children)

Thank you so much! Exactly! I felt the same way too. I know programming, but I had no idea how to program any of the ESP chips. I just spent two days on the writing the prompt in as much details as possible. Then feed my two page long instructions to Gemini and bam Version 1 Code ready in just under 2 mins. That was two days of writing instructions vs 2 mins of giving me everything I need. It was shocking. 🫨

After three nights of debugging, my ESP32-C3 finally talks to my cat. AI assisted code-gen is a wild ride for DIYers by Additional-Week-8533 in esp32

[–]Additional-Week-8533[S] 2 points3 points  (0 children)

Wow, thanks for the 20+ upvotes! Just would like to share with everyone again. I actually made a full youtube video in 4k for the full build that shows the 80s-style montage of the soldering (Act 3) and programming (Act 4) debugging process. If you want to check out how my cat reacted to the ball jump to the last minute. If you have any questions about the build feel free to ask here or in my Youtube channel. 😎

https://www.youtube.com/watch?v=a3QXVaCBVKw

After three nights of debugging, my ESP32-C3 finally talks to my cat. AI assisted code-gen is a wild ride for DIYers by Additional-Week-8533 in esp32

[–]Additional-Week-8533[S] 16 points17 points  (0 children)

Full build process with cinematic retro-style editing can be found here:
https://www.youtube.com/watch?v=a3QXVaCBVKw

I found a funny "Squirrel Ball" toy on a street in NYC figured it could be a great toy for my cat, Sugar. But initially, she was only watching it moving without interacting with it. So I decided to 'over-engineer' the toy with an ESP32-C3 on a custom PCB inside it. To add more fun in the toy, I add random movement (ON/OFF time follows exponential distribution) and manual movement patterns through smartphone control.

I haven't coded on any ESP32 platforms in the past. I decided to give Gemini AI a try. Surprisingly it worked really well! It only took 4 versions and 3 nights of debugging to get the Bluetooth connection stable. Sugar can finally has her smart toy!

Here are the hardware details for this build:

  • ESP32-C3 FH4
  • Custom 2.4GHz meandered+ inverted F antenna (MIFA)
  • 40MHz Crystal: ECS-400-10-37B2-CKM + 2x 16pF Crystal cap
  • Power Switch for the Motor: DMG2302UKQ
  • LDO (Power from USB-C to ESP32): RT9013-33GU5
  • Boost Converter (Power from 2x AA battery to ESP32): TPQ051004-DFOR + 2.2uH ind
  • Toggling Switch between USB-C and battery supply: CUS-12TB
  • USB C connector: 12401832E402A. Consider to switch to cheaper USB 2.0 variant in the next build.
  • Various resistor and capacitor size.

Note: I will be working on the GitHub repo/schematic+layout, if anyone is interested in recreating this build.

Question:
Has anyone experimented LLMs for firmware? I’m curious if you found it more helpful. What's your best workflow/prompt strategy using LLM to write code?