Inspiration
We wanted to make embedded development more accessible and intuitive to learn. So, we took inspiration from the success of Scratch's approach. By turning functions into tangible entities on a screen, anyone with a mouse can learn to program, build, and flash firmware from a single window. EmBlocks does for embedded systems what Scratch does for videogames.
With special thanks to Dr. Steven Knudsen for the workshop that inspired this project, and for providing free RP2040 microcontrollers.
What it does
Our project is a highly abstracted block-level development for embedded systems development.
Freely create and manipulate blocks that program your microcontroller
Save, share, and load your programs by downloading JSON files. You can start where you left off and collaborate with the exact same editor state, just by using the JSON files.
Building transforms blocks into readable C code, making low-level programming accessible to everyone, even elementary students.
How we built it
The editor is built in Odin with Raylib and MicroUI, and the state of the editor is represented as a JSON file.
Each block in that editor represents underlying C code. When the user wants to build and flash the software they created, EmBlocks generates a .c file from the blocks.
To build the files, EmBlocks calls CMake with the Pico SDK to compile the firmware into a .uf2 file.
To flash the firmware, EmBlocks polls available USB devices for Raspberry Pi hardware and copies the firmware to the microcontroller.
- This triggers an automatic restart, initializing the program that was just flashed.
Challenges we ran into
We initially intended to use a pool allocator for our UI elements. We understood the theory behind pool allocators and the importance of UI optimization, but decided on a dynamic array to accelerate our development.
Accomplishments that we're proud of
We created a well-polished product with incredible potential within 48 hours, with technologies that were entirely new to many of us.
We showed our technical competence and ability to work in a fast-paced environment with complete product ownership.
What we learned
Most of us were unfamiliar with the tech stack and embedded systems development. We thank Isaac's patient mentorship for our rapid skill acquisition.
- Odin: A novel and rapidly growing general-purpose systems programming language
- Raylib: A library for videogames interface programming. We used it to draw our UI components.
- MicroUI: A library for lightweight boilerplate UI components and logic.
We learned the fundamentals of UI, reactive and persistent app states, code generation, and embedded development. We explored the advantages and disadvantages between native libraries and non-native libraries.
What's next for EmBlocks
Isaac McCracken will polish and publish it as a product that brings value to the world as a powerful tool for embedded systems education and development. We hope to introduce learners to embedded development in a real-world education environment and make programming more approachable to modern students. All of us enjoyed this hackathon and expect to participate in more.
Built With
- odin
- raylib
Log in or sign up for Devpost to join the conversation.