After many months of using EasyEDA for PCB design due to its tight integration with LCSC's parts catalog, I switched to KiCad for one critical feature: 3D model exports for designing enclosures. Despite KiCad's vast library, sourcing symbols, footprints, and 3D models for less common parts was no picnic. Luckily, the 'easyeda2kicad' Python package became a game-changer, converting EasyEDA models from LCSC into KiCad-compatible formats. It's a neat workaround, though one must stay vigilant to verify footprints against component datasheets to avoid manufacturing mishaps. Blend freeware magic with a dash of tinkering in CAD software, and voilà - your custom...
After some quality time with my ESP32 microcontroller, I've developed a version of the TinyTV and learned a lot about video and audio streaming along the way. Using Python and Wi-Fi technology, I was able to set up the streaming server with audio data, video frames, and metadata. I've can also explored the picture quality challenges of uncompressed image data and learned about MJPEG frames. Together with JPEGDEC for depth decoding, I've managed to effectively use ESP32's dual cores to achieve an inspiring 28 frames per second. Discussing audio sync, storage options and the intricacies of container file formats for...
In another thrilling adventure with ChatGPT, I endeavored to integrate it with a Raspberry Pi, effectively turning it into my own personal light switch. My custom ChatGPT plugin, sporting just two endpoints, could revolutionize how we handle APIs, as it managed to control five different lights with simplicity and style. With a dash of YAML magic, ChatGPT managed to deduce the entire process, paving the way for future smart home projects. Big or small, the potential applications are endless and might even lead to computers communicating in human language!
In this post, I cover the migration of our cocktail bot to use the newly available ChatGPT API. Prompt engineering is performed to accurately guide the bot's versatility in cocktail recommendations. A Python application is provided via GitHub for testing the chatbot. To ensure appropriateness in user inputs, a moderation system from OpenAI’s API has also been integrated. However, readers are reminded to consume the AI's cocktail suggestions responsibly and remember that it's just a machine- its advice could potentially lead to less than satisfactory results.
In a sea of ChatGPT chatter, we're stirring things up a bit with a cocktail chatbot of our own. From 'prompt engineering' to tailoring your bot for chit-chat about martinis, we've got you covered - the OpenAI playground is our bartender school! It won't just mix up your favorite cocktails, it remembers your preferences too, just like your favourite barman would. Be warned though: my fancy mixologist bot won't be held responsible for any questionable cocktails or spectacular headaches you end up with! So, pull up a barstool and let's dive right in.
I've delved deep into the reason why people prefer to use wedge-shaped coils when building PCB motors. After a lot of Googling, a bit of Python scripting, and a ton of visuals, what emerged was a very compelling argument for the humble wedge coil. Turns out, radial lines are the heroes in the story – the more the merrier – because these are what generate the fields in the correct direction to crank up the torque. Don’t get too attached though; there may be alternative, more efficient coil designs yet to discover, but those are topics for another day!
Recently, I've been dipping my toes into the world of KiCad action plugins, specifically one for generating coils. In this post, I've jotted down some key learnings that would serve as a guide for myself in the future and for anyone else interested in building KiCad action plugins. Here, you'll find insights on getting the current board, adding objects, specifying the start and end points for tracks, creating vias, adding silk screen text, flipping text to the other side, connecting things to your PCB, and more. You'll find code snippets for these and links to additional resources. As my understanding...
In this blog post, I share how you can avoid hassles of SSH and use VSCode for remotely developing on the Raspberry Pi. I walk through how to initially configure the Pi in a headless setup using the Pi imager app. Then, we install the 'Remote Development' extension in VSCode. I illustrate how easy it is to connect to the Pi using our SSH credentials, clone a GitHub project, and install python extensions. Finally, I explore how to run the code and debug it. However, note that the method doesn't support armv6, so you can't use it on Pi Zero....
This post provides a comprehensive guide to building a do-it-yourself (DIY) Alexa using an ESP32 and Wit.ai. It illustrates how to create a wake word detection system, use Python for machine learning and employ TensorFlow for the 'wake' word identification. It also covers the usage of Wit.ai for intent recognition and managing commands. The post is fully backed with code snippets, examples and video tutorials to deliver an interactive learning experience to readers.
In this blog, I venture beyond binary classification and delve into categorical classification using TensorFlow. Specifically, I show how to generate and classify images into four categories: blank, square, circle, and triangle. Crucially, I highlight the use of one-hot encoding for labeling and the softmax activation function in our model. I provide examples of code, results of my model's predictions, and link to the full code in my GitHub repository. Feel free to try it out and explore this exciting domain of machine learning further.
In this post, I reminded myself about some peculiarity with TensorFlow's tf.random.shuffle. I assumed that using the same seed for two shuffle operations would always output the same results but turns out, I was wrong! I discovered that I need to set the global seed with tf.random.set_seed() before every operation to get consistent results. Definitely a lesson learned to pay a bit more attention to TensorFlow's well written documentation about seeds usage for random operations.