A few days ago, a beginner asked me why, after running through all the examples on the STM32 development board—from lighting LEDs, handling buttons, serial communication to ADC acquisition—he felt he understood the code. However, when it came to starting a project, his mind went blank, and he had no idea where to begin.
It feels frustrating to have worked so hard and still be at this level.
I told him, what do you expect? After a few months of learning, I only reached a level of independent development after 3 to 4 years of work, and even then, it was still relatively challenging for complex projects.
This isn’t about being slow; if you want to improve faster, you need to adjust your learning direction. I wasted years because I didn’t understand this back then.
Even if you have run all the peripheral examples, have you tried combining two or more peripherals to achieve some functionality?
For example, can you implement an adjustable breathing light frequency using buttons, timers, and LEDs?
If not, the knowledge you’ve learned will always be isolated points that cannot form a line, let alone a surface. However, doing projects often requires the ability to create a surface.
The examples provided by development boards are written by manufacturers to help you “validate” the functionality of the chip; they lack a specific “purpose”.
In contrast, creating a product is driven by “purpose”. What you need to do is never just “implement an ADC function”; instead, it’s about “solving a specific problem”, such as “triggering a low battery alert when the ADC detects that the battery level is below 20%”.
So how do you overcome this hurdle? Don’t expect any shortcuts; just do it, but do it smartly.
Step 1: Start with Function Integration
Don’t be satisfied with just running individual examples anymore. Challenge yourself. Combine buttons with seven-segment displays, ADC with screens, etc.
If you don’t know how to combine them or feel that figuring it out on your own is too slow, you can follow along with us on actual projects, each of which has different functional logic.
Forcefully integrate a large number of independent examples and functional codes into one project to form a complete product functionality.
During this process, you will encounter various issues such as variable conflicts, functional conflicts, and chaotic function calls. Congratulations, solving these problems is where your real growth begins.
After a few projects, both your thinking and development skills will see a qualitative improvement.
Step 2: Start Easy, Then “Copy” Once.
Don’t always think about achieving something amazing and original in one go. You can look for small open-source projects that others have done.
Write down the functional requirements, then start from scratch, implementing the functionality step by step according to the requirements. If you get stuck, you can refer to others’ code, but don’t just copy and paste; understand their thought process and then write it out in your own way. This process is about imitating others’ “architectural ability”.
Step 3: Set a Target for Yourself and Hit It.
This is the most critical step. Set a real but small project for yourself. For example, with summer coming, you could create a smart fan that automatically turns on when someone approaches.
For human detection, you can use infrared, radar, or even light sensors, and controlling the fan would involve using a relay.
This requirement may seem simple, but it encompasses everything. It forces you to think: What components do I need? How do I connect the hardware? What should the main loop of the program do? How do the various modules cooperate?
Thus, the transition from “understanding examples” to “creating products” is a shift from being a “reader” to being an “author”. The former only needs to passively receive information, while the latter must actively create. This gap cannot be filled by any theoretical knowledge; you either need someone to guide you, or you rely on yourself to “tinker” repeatedly, fail repeatedly, and debug your messy code until you gradually get the hang of it.
end
