记录首次电赛校赛通过

绪论:7月份才拿到省赛资格的学生,没有免费获取TI板的资格😭😭

背景:一个属于转专业学生的悲剧

七月的成功太过顺利,以至于两个月前的暗淡离场显得云淡风轻。不过,历数整个学期的筚路蓝缕,5月校赛却显得尤为重要。3月初,校赛安腾杯结束,相比于拿了无关紧要的校级奖项而言,那次比赛中意义更大的事情是:加入了心仪的俱乐部,结识了自己未来的学院的比赛高手,以及知道了不是一等奖的校级奖项没有一丁点综测分的残酷事实。初有成就的我转向了更高级别的比赛,而不是拘泥于学校组织的那些小卡拉米,在此之中我慢慢发现很多比赛含金量就那样,而由于不知道哪里的传闻我被告知“失去”了打电赛的资格。于是我报了嵌赛打算养老式学习:反正7月才线上初赛,对于刚打完圈钱杯蓝桥杯的我而言,早着呢。

然后我从未想到我这个想法和我日后发生的所有事情都背道而驰。因学期缩短,期中早早开始,眼看期中就要结束,一个炸裂的消息传来:我可以报名电赛。得到这个消息的我只能在期中结束后厚着脸皮和林HZ讨要别人拿剩的硬件,至于日程和这个比赛高度重叠的转专业的事情,不是我能怎么办啊。等到我正式把车拼好,不再改变机械结构的时候,我在新工楼的空地上找到了昔日的同好兼对手,然而我们看到的是:精美的车轮,高级的传感器,酷炫的外壳,和我们那如同路边乞丐一样的外设形成了鲜明对比。

此后的所有事情都失去了我的控制:作为转专业的学生,我的队伍全都是转专业的,当我还在为借到一个大小合适的面包板而感到成就感满满时,新工楼内已有超过一半的人完成了半圆巡线。而后面依次发生的噩耗是:两个电机转速不一致,没有合适的螺丝,电控板堆积过度导致重心不一致,轮子高度不一导致车体倾斜,甚至发生过传感器当场报废的事情。最后的展示,以“车停不下来”而失败告终。

失落的小车

这个比赛让我开始有了莫大的心理阴影,我曾经说过我下辈子都不会再搞小车,日后无论是推进缓慢的嵌赛,还是没有符合裁判口味而止步省二的中美创客赛,我都在搞静态项目,六月匆匆过去,嵌赛已经事实上没有了深度打磨的机会,为了不想浪费token随便打的软件杯最多是杯水车薪。一切似乎就这么尘埃落定,大一的履历好像就到此为止了,直到7月2日,我再次有了校赛选拔的机会。而这次,一切都出乎意料的顺利:昔日望着拿满分而脸上暗淡无关的失落者,终究成了别人眼中满分的样子。

正题:比赛内容

本次比赛我们选了电控类(F题),主要的目标就是:

用PID实现电机转速的精确调节与角度/圈数的精确控制

我们的整体思路大体就是:

  1. 测试最基本的开环测速功能,即给一个数值,转到对应的转速,LCD上显示值
  2. 写最基本的PID,留待后续调试;
  3. LCD画转速曲线并和按键联动完善各个功能;
  4. 完成外围功能,如EEPROM存储和串口显示等。

出现的问题和解决流程

1.不能用ST-LINK

应该算是我遇到过有史以来最离谱的事情,派发的板子板载DAP,然后…不支持st-link,好巧不巧CubeIDE对DAP的支持几乎为0,队友Y重置电脑还不能马上用keil,最后的解决办法是:队友L用agent烧录,我用Clion😅……

2.互通问题

理论上而言各个编译stm32的软件,其编译文件可以通过CubeMX这个“桥”来互通,但问题是:AI容易在重写代码的时候把user code的注释全部打掉,而不会同时把配置写入到.ioc上。我曾经试过修复所有的user code注释然后让AI一点一点把失去的cfg修复回来,最后发现队友发的不是最新代码……然后我彻底放弃了让CubeMX互通的想法,直接让AI写Cmakelist,某种意义上还比改cfg文件更省token,反正都是vibe coding……

3.异常跳动问题

第二版本的pid烧录到硬件时,会有相当难绷的霍尔转子反复跳动的问题。在我们一筹莫展时agent灵机一动,换了个引脚就无事发生了,草台班子的厕所杯蓝桥杯特供板子再显权威:把已经被占用的引脚露出当接口

4.电池问题和转速乌龙

当时,我们为了转速只能到可怜的四五百而一筹莫展,因为当时的要求是非常离谱的:

200–2000 r/min 全范围可稳定闭环运行满分;范围不足按比例

啥玩意?2000?在茫然之中我借来了一套大小堪称皇宫的12.6V 航模电池模块,接上去之后,效果立竿见影,但最高的转速就900,不能再多了。后面问了主导老师,它含含糊糊说了句:转速值没有要求。现在我们得以确认他写的所有东西都是垃圾AI拍脑袋想出来的

5.交付测试时出的问题汇总

交付测试时也不顺利:首先是我差点没从队友发出的图片看出来那边实验室用的居然是示波器电流源两用仪器,然后修改了串口设置时波特率和接收方式不对劲的小问题。更大的问题到交付结束后都没有解决:探头连上对应的针脚后,本应出现的正常的方波居然出现了先前从未见到的瞬时振荡,好在队友L口才相当好,把这个现象解释成pid的动态调参。

优美的曲线

难以理解的小幅振荡

结果

!满分通过 !我们终于体会了一次当满分选手的感觉,几天后,也就是7月28日,我们队伍将和5月份一起晋级的队伍,连同全福建的大学生同台竞技。

附录

1.源码


源码放在仓库上:源代码在这,欢迎讨论🙂。

意义何在?为什么毛衣领导竭斯底里地想禁止外卖?

Where is the sense? Why the leader of MMYZ always wants to ban the takeway food HYSTERICALLY?

For MMYZ, the most dramatic part is the long-running “battle” with students over ordering takeaway food. Everyone knows that when MMYZ was moved out to a place in the middle of nowhere, the biggest headache was the lack of food variety, not to mention that the school has never really cared much about improving the quality of the canteen meals. Because of this, for students at MMYZ, there has been always a simple but important problem: how to actually eat better at school.

2013, MMYZ relocated to the Gaodi area. In theory, food-related problems should have emerged at this time. However, in reality, the contradiction between students’ demand for food variety and the school relocation was not very sharp at the beginning.In 2020, the school snack shop was suddenly closed quietly without any clear reason. Earlier than that, there was a syrup shop next to the police station in the east zone. Unfortunately, for most students, they could only see its remaining signboard. Later, it was turned into a base for the Communist Youth League (CYL).In 2022, the school grocery store was also forced to close due to conflicts of interest between the former principal—who has been imprisoned—and the new leadership team. If Media Real Estate (“Media RE”) opts to develop high-profit projects in other undeveloped areas instead, many sugar lovers may end up spending their three years of high school with very few chances to drink iced tea.

I just gave a few examples, but they are enough to show that before 2015 or even earlier, students of MMYZ at No. 8 Haixin Road were living a relatively happy school life. It can be imagined that, in its early stage, MMYZ tried to create such a wide range of conditions for students partly as a message to parents: to prove that even after being moved to the suburban area of Dianbai, students’ daily life could still be as good as what they used to have in the city center.

However, in 2015, Maoming Polytechnic (M.P.) set up its South Campus just one street away from MMYZ. Many nearby farmers quickly spotted a business opportunity and set up small stalls right in front of the Maoming Polytechnic gate. The local government also saw this as a chance to boost economic growth. As a result, under the promotion of the district government, a food street was built at the entrance of Maoming Polytechnic. A few years later, barber shops, snack stores, printing shops, and other businesses also appeared around this area. While the surroundings of MMYZ were still mostly weeds and rural land, a complete commercial ecosystem had already formed in front of Maoming Polytechnic. However, those farmers who were good at doing business would not limit their target customers only to students at Maoming Polytechnic. Gradually, for the leadership of MMYZ, the “barrier” they once imagined began to slowly fall apart.

Since 2012, when MMYZ moved to Shuidong area, there had already been some scattered small shops providing takeaway services for MMYZ students. At that time, the school, influenced by a conservative mindset, took a very strict and high-pressure attitude toward takeaway food. Even so, takeaway was still a small-scale and limited phenomenon at this stage. After the South Campus of Maoming Polytechnic (MP) was established in 2015, the situation changed completely. More and more students began to question the quality of the MMYZ canteen. Some students posted photos of their stainless steel lunch boxes showing black oil stains after meals, and the student who posted them was immediately criticized for being “immature” and “not sensible.” Against this background, more and more students started ordering takeaway. On the first day of each week, students standing under the sun could often hear announcements about punishments related to ordering takeaway(MAOYI ZHONGZHENG, “茂一中政”). However, one rather ironic thing was that this kind of disciplinary publicity actually helped spread takeaway even further. In 2018, the school strengthened its security, and students’ takeaway deliveries were, for a time, no longer guaranteed. However, this tightened security quickly proved to be ineffective. Students always managed to slip through the prison-like fences and pick up their food during moments when the guards were not on duty. The school security staff soon grew tired of this pointless cat-and-mouse game. Gradually, they began to “work on and off,” doing things sporadically, and only increasing patrols when they were urged by higher authorities.

In 2019, COVID-19 suddenly broke out. At that time, MMYZ used “pandemic prevention” as a pretext to further tighten restrictions on students. In the early stage, frightening reports of deaths caused by the virus made many students who wanted to order takeaway back off. However, when the situation gradually improved, the trend of ordering takeaway came back strongly. At one point, a student at MMYZ was diagnosed with tuberculosis, and the school leadership publicly claimed that it was “caused by ordering takeaway.” Using this as an excuse, they even brought in police forces from outside the school. Takeaway deliveries were temporarily cut off. However, it did not take long before everything returned to normal. Students at MMYZ were not naive—they knew it was impossible for every takeaway chef to be infected with tuberculosis. As a result, restaurants with proper storefronts actually received even more orders during this period.

If it were only like this, then the issue of ordering takeaway would still be within the control of MMYZ’s leadership. Although many teachers, when seeing their students rushing toward the fence right under their noses, would simply turn a blind eye, there were still always some students ordering takeaway who failed to escape detection and got caught by school leaders or security guards. These “catchable cases” then became material the school could use to publicize its so-called strict enforcement, presenting it as weekly “achievements.” But the outside world was never fixed or stable. Real estate developers had long set their sights on the area: in 2017, Media Real Estate Plaza and Shimao Yunting were both built up with high-rise buildings directly opposite the east gate of MMYZ. In 2019, the first phase of Media Real Estate Plaza officially went on sale. The pandemic control measures were hastily ended in 2022, but the dormitory rules that had been introduced during the pandemic—rules that many students saw as unreasonable and restrictive—remained in place. Students who were strongly dissatisfied with dormitory management began to look toward the distant high-rise buildings.

As one of the pioneer who bravely chose to become a day student, I, despite others questioning the meaning of day schooling, firmly decided to leave the dormitory. At the beginning, the garden of Media Real Estate Plaza was quieter than a graveyard. The burger shop at the west gate closed purely depending on the owner’s mood. During the period when the MMYZ-owned snack shop shut down after only one month of operation, I once almost fainted from hunger at home. But within just one year, the same place underwent a dramatic change. The garden of Media Real Estate Plaza was visited by children every day, and every household had to watch out for mischievous kids stealing bicycles. At night, the plaza was brightly lit, almost like daylight. In front of the snack shop, there were always MMYZ students in school uniforms holding their phones, eating while watching videos. At the west gate, permanent stalls appeared, along with barber shops, restaurants, and even real estate agencies—just like what you see outside MP. At the same time, MMYZ’s inhumane dormitory policy started to pay for their actions. More and more students were willing to pay extra money to landlords or real estate developers rather than stay in the dormitory for even one more second. During the first month of each semester, the leaders’ desks were always lined with long queues, and arguments between students and administrators could often be heard. Day students became so numerous that the school had to borrow a large conference hall just to hold “meetings” with them, mainly to deliver the school’s official ideology. In some classes, day students even OUTNUMBERED boarding students—an unprecedented situation.

The emergence of day students completely shattered the carefully constructed “Berlin Wall” of MMYZ. These students brought an unprecedented level of mobility to MMYZ, and this mobility naturally extended to food. When a day student walked past the security guard carrying a large bag filled with steamed buns and soy milk, was the guard supposed to question whether the student had “too big an appetite”? At this point, the leadership began to regret not abolishing the commuting system earlier. But the day students, free to come and go, were not going to back down just like that. Buying bread and milk for others, ordering takeaway on someone else’s behalf, or even purchasing any daily necessities—these were just a matter of convenience, as long as the day students were willing to do it.

The emergence of day students did not only benefit the students themselves, but also the restaurants and street vendors near Maoming Polytechnic (MP). In the past, under MMYZ’s strict and high-pressure security policies, many vendors were unwilling to do this kind of hard work for little return. However, the arrival of day students gave them a stable customer base. Given the long commuting distance between the city center and Shuidong, not all day students had parents accompanying them. For these students, the most convenient, fastest, and even cheapest option was simply to call a fast food shop that could meet their expectations. A stable customer base brought stable income, and with it, enough confidence to play a a running battle with school security. Even when the school replaced its security staff again and again, and even when security checkpoints were installed at every gate(wtf is it useful???), these measures quickly became nothing more than decoration. A new group of security guards continued to be worn down by constant patrols and chasing, but their low salaries could not support such exhausting work. By the year I graduated, every evening outside the fences of the teaching buildings, street vendors were handing drinks, grilled sausages, and takoyaki over to students, while the school leadership either did not know, or simply could not control the situation. In short, takeaway had become an important “ecological niche” in the daily diet of MMYZ students, and the school’s heavy-handed control had simply lost its grip.

It is clear that MMYZ’s history of cracking down on takeaway has been quite “eventful.” Yet a rather ironic fact is that while school policies kept getting stricter, control over takeaway became increasingly ineffective. It is hard to imagine that in just six years, takeaway has gone from something “novel and unusual” to something that almost every student has ordered at least once. If someone were to conduct a secret survey asking students who have never eaten takeaway since entering high school, would their number even reach half of the entire student body? And if the question were changed to “what proportion of students have eaten only school canteen food since high school,” the answer would very likely be far below half. By the time I am writing this article, I have already graduated. However, the residential buildings of Media Real Estate Plaza will not disappear overnight, and the commercial environment at the west gate will only become more and more developed as more families move in. From now on, the takeaway food problem faced by MMYZ’s leadership will only become more difficult to handle, no matter how strict their future policies may be.

From the school’s perspective, restricting takeaway clearly serves the school’s own interests. However, what this article aims to highlight is why MMYZ’s crackdown on takeaway eventually escalated to what can almost be described as a HYSTERICAL LEVEL, and why, despite all of this, the results were poor, with many policies instead becoming a source of ridicule among students.

The reasons? On the one hand, there is MMYZ’s naturally conservative policy orientation. Maoming, as a city with severe population outflow, has seen the quality of MMYZ’s student intake decline year by year. When the results of the Gaokao become increasingly disappointing, MMYZ has had to resort to the control methods of a third-tier school—tightening management over issues that are not directly related to academic teaching. As a result, ordering takeaway has become a particular “thorn in the eye” for MMYZ’s leadership. From another perspective, this conservatism also comes from the school’s fear of public opinion from families and society at large. The leadership at MMYZ has no real control over takeaway; yet if anything goes wrong with the takeaway food, parents will still hold the school responsible, putting it in a difficult, caught-in-the-middle position.

On the other hand, MMYZ’s leadership has always tried to turn the school into a closed-off campus—the more closed, the better. In this way, everything within MMYZ could, in theory, be kept under full control by the school. This logic is easy to understand: once external factors are involved, the leadership can no longer have absolute control over everything. Students, on the other hand, have always been relatively easy to manage—so in many cases, if something happens, simply pressuring students into silence is enough. Takeaway food, however, is something that involves “outside forces,” and for that reason it naturally makes the school leadership highly wary.

Some people argue that ordering takeaway is fundamentally a food safety issue, and that alone already gives the school sufficient grounds to ban it—so there is no need to bring in questions about whether the campus is closed or not. I do not intend to deny the importance of food safety, and I am also fully aware that many frontline teachers advise their students not to order takeaway precisely out of concern for safety. However, the standards used to evaluate food safety in the school canteen and those used for takeaway food are not on the same level at all. In places close by, such as small villages next to MMYZ, or farther away, such as grilled food shops in the Gaodi market, it is not only MMYZ students who eat there—many people have tried them, including some frontline teachers. As a result, these restaurants receive all kinds of feedback, and the flow of information and evaluation is almost impossible to block.

So what about the MMYZ canteen? When the canteen once served millet porridge for breakfast and nearly one-fifth of MMYZ students suffered from diarrhea, was there ever any follow-up investigation or public reporting? When the person in charge of the canteen gave vague, repetitive, evasive answers about the breakfast issue, did anyone continue to hold them accountable? When students discover that a takeaway shop has problems, they can simply throw away its takeaway card. But students who get sick after eating food from the canteen—what other options do they really have? MMYZ students are smart and courageous, and they have tried many ways to protect their own food safety. Yet students who showed photos of black oil stains on their plates were harshly criticized, and the school responded by tightening mobile phone regulations. Students who complained to their families often found themselves accused of spreading rumors. Even when students used non-internet-enabled cameras to take photos of plates containing worms or even cockroaches and made them public, they were still warned by the school’s “hidden enforcers” not to damage the school’s image.

All of these problems ultimately come down to one root cause: the school does not want its closed-off system to be broken. From the school’s perspective, once anything leaks to the outside, it will be forced to face external pressure, which would leave it stretched too thin to manage. Therefore, the school chooses to cut off any channel through which students could spread information to the outside world. Even the policy of giving students a break once every three weeks—especially around midterm exams, final exams, mock examinations and so on—is part of this strategy, because grievances that seem urgent at a given moment may lose their relevance just a few weeks later. And under high stress, students may even forget how many times they became ill after eating food from the canteen. The school’s vague and ambiguous way of addressing food issues also serves the same goal of maintaining closure. After all, unclear statements may at most lead to dissatisfaction among students, but it is difficult for them to find concrete flaws to challenge.

Even from the perspective of MMYZ’s strict regulation of takeaway, the school’s heavy-handed response to this issue is, in many ways, quite absurd. It is true that small vendors originating from rural farm-style eateries can always carry a risk of food safety “blow-ups.” However, when it comes to its own canteen, the school leadership has never exercised any truly effective supervision. Over the past six years, the canteen contractors have changed one after another, yet for almost every single week during these years, there have been complaints from students about finding insects or hair in their food. It is hard not to feel that the school canteen reflects a kind of systemic BLIND-EYE PROTECTION. Going further, one has to ask: should the school leadership be held responsible for the canteen at all? Judging from the fact that even frontline teachers rarely choose to eat in the teachers’ canteen, the most that could realistically be expected, even if responsibility were acknowledged, would probably amount to nothing more than a symbolic “three drinks as punishment.”

So the question arises: the school administration, citing food safety concerns, refuses to allow takeaway food that it deems “unsafe” onto campus. Yet the irony is that the hygiene conditions of the school’s own two canteens are also far from satisfactory in the eyes of students. So what exactly students can do? On one side, takeaway food whose safety is uncertain; on the other, canteen food is clearly questionable. Or perhaps the more fundamental question is this: do students ever truly have a real choice in the first place ?

What makes the situation even more striking is that, in the face of its limited ability to genuinely regulate takeaway food, the school tends to focus almost entirely on suppressing students’ access to spaces and channels that lie beyond its control. At the same time, the problems with the school canteen have never been fundamentally addressed. Whether the school has ever truly taken them seriously remains an open question. Even minimal improvements would have been enough to sway students who are constantly weighing their options between takeaway food and the canteen, back toward the latter. The food safety issues of the canteen are not invisible; rather, they are plainly visible, yet no one is held accountable, and no meaningful change is ever made. This kind of structural opacity, combined with institutional inertia, is far more unsettling than the risks that are openly acknowledged.

As for the conservative mindset underlying school governance, at this point we may have to admit that, within a governance framework where administrative control becomes the upper limit of capability, schools like MMYZ often end up relying on crude and heavy-handed methods. However, such seemingly strict and forceful policies have historically proven to be largely ineffective. Looking across Guangdong Province (excluding schools that boost their results by financially incentivizing students dissatisfied with their Gaokao results to repeat a year at their institution), the genuinely long-standing and competitive high schools are rarely those that repeatedly crack down on issues like mobile phones or takeaway food.

The leadership at MMYZ often emphasizes “the Sinicization of Marxism” in countless meetings. Yet when they actually confront practical issues such as takeaway food, student dating, or mobile phone usage, the response is often a blanket ban, with little sign of any nuanced or dialectical consideration. A knife can be used to cut fruit, or it can be used to harm oneself. The problem does not lie in the tool itself, but in how it is used. However, when the logic of schooling gradually drifts away from the central goal of human development, policy easily shifts into another direction—treating the use of modern tools themselves as problems to be eliminated, and attempting to restore order through punishment. This, ultimately, reflects misplaced priorities.

Today, I have long since stepped out of that former “prison,” yet from time to time I still see classmates from my cohort or earlier years who surprisingly talk about wanting to “go back.”Some of them, no doubt, are reacting to their current situation in third-tier universities, where even the behavior of those institutions’ administrators is in some ways worse than what they experienced back in high school. The rest are perhaps true masters of endurance—skilled in submission, and gifted in bearing hardship without complaint.

Earlier this year, I visited one of my former beloved teachers at MMYZ. Even when I walked over to the fence just to order a drink, I still had to do it in a cautious, almost sneaky way. It is therefore clear that even for graduates long after leaving, what they miss is the teachers and classmates of the past, not the school itself. This kind of split narrative is, in fact, the result of increasingly strict policies imposed by the school. The leadership at MMYZ should not imagine that the surrounding commercial ecosystem will simply vanish overnight. Of course, institutional inertia will still push them toward increasingly strict policies, even though many things—such as the academic performance of Gaokao students—will not improve at all, and may even get worse.

As for how future graduates will evaluate their “alma mater”, I will leave that open for now. It is enough to say this: a school that keeps trying to make itself more and more closed should not expect its future alumni—except for its most loyal supporters—to speak of it highly.

(THE END)