07/08/2024
In this fun hobby project, we're looking at how live coding can make developing for embedded devices a lot easier. Normally, working with these devices involves a repetitive and boring process: you edit the C code, compile it, and then upload the new code to the device. This can be a real hassle, especially if the device is in a hard-to-reach place, like our microcontroller-powered owl perched high up on an eave. Physically accessing it for updates is not just inconvenient, it's impractical.
That's where Xedge comes in. Xedge is a tool that allows you to edit code live directly on microcontrollers. It's great for things like IoT, remote control, data logging, and real-time updates. One of the best features of Xedge is that it lets you edit Lua code live without needing physical access to the device. This is perfect for projects where the device is hard to reach, like our owl scarecrow.
Our project started with a simple owl scarecrow meant to keep birds away. The original version had a spring-loaded head, but the birds quickly figured out it wasn't a threat and kept making a mess.
To fix this, we decided to upgrade our owl using Xedge. We added a servo to move the owl's head and LEDs to make its eyes blink, making the owl look more realistic and scarier to birds. The microcontroller, which we programmed using Xedge, controls these parts. Now, our owl scarecrow works much better and actually keeps the birds away.
The real game-changer with Xedge is its live editing feature. This means we can tweak the Lua code remotely, without having to climb up and physically access the owl. This saves us a lot of time and effort. For example, if we see that the owl's movements are too predictable or the LEDs blink too fast, we can instantly adjust the code in real time. This way, our scarecrow stays effective and we can quickly adapt to any changes needed.
We put together a fun project using an Xedge32-powered ESP32 microcontroller, a servo, and a couple of LEDs. With its spring-loaded head, the original owl sc...