Inspiration
We were inspired by how often we saw powerful microcomputers like Raspberry Pis being used for tasks that didn’t need that much processing power, such as blinking LEDs, collecting simple sensor data, or triggering relays. It felt like overkill, especially in projects where cost and energy efficiency really matter.
We realized that if companies could replace these expensive boards with low-cost microcontrollers like the STM32, without changing how developers write code, they could save a lot of money at scale. Recognizing this as a great opportunity, we set out to build a solution that bridges that gap.
What it does
Py2STM is a tool that lets developers write embedded logic in Python, then automatically converts that code into optimized C for deployment on STM32 microcontrollers. It makes hardware development accessible and cost-efficient, without sacrificing ease of use.
How we built it
We built a code translation pipeline that parses a subset of Python, maps supported constructs to equivalent C code, and compiles it using STM32-compatible toolchains. The tool is designed to be simple to use, with a focus on common IoT and sensor-based workflows.
We tested the output on STM32 Nucleo boards and validated behavior through LED control, sensor polling, and serial communication examples.
Challenges we ran into
The biggest challenge was ensuring the translated C code remained efficient and correct while preserving the behavior of the original Python. Memory constraints and hardware-specific quirks of microcontrollers meant we had to carefully manage how data structures and functions were mapped.
Balancing flexibility with safety and reliability also took time. We had to limit the scope of Python features to ensure stable compilation and predictable behavior on low-resource devices.
Accomplishments that we're proud of
- Developed a working Python-to-C converter tailored for STM32 microcontrollers
- Successfully ran Python-written logic on real STM32 boards
- Demonstrated clear cost savings by replacing overkill hardware with simpler microcontrollers
What we learned
We learned a lot about embedded systems, cross-compiling, and code generation. We also deepened our understanding of memory management, I/O operations, and the trade-offs between developer convenience and hardware performance.
Most importantly, we learned how small design decisions can significantly impact hardware compatibility and efficiency.
What's next for Py2STM
We plan to focus on integrating Py2STM into small and medium-sized businesses (SMBs) to help them reduce hardware costs and unlock more sustainable long-term growth. By enabling these companies to replace over-engineered solutions with cost-effective microcontrollers, we provide a clear path toward scalability and efficiency.
We also aim to expand beyond STM32 by developing similar code converters for other popular microcontrollers. This will give clients more flexibility in choosing hardware while continuing to address the root issue of overengineering in embedded systems.

Log in or sign up for Devpost to join the conversation.