Skip to content
[繁]

Vibe Coding: A Crash Course in AI-Assisted Programming — Suggested Answers ​

  1. You are an embedded-systems engineer.

    Generate a program for an ESP32 that runs in the Arduino IDE and meets these requirements:

    • Control an LED connected to GPIO 2.
    • Change its brightness smoothly from dim to bright and back again to produce a breathing effect.
    • One complete cycle should take approximately two seconds.
    • Control brightness with analogWrite; do not use delay().
    • Use millis() for timing so that the main program can continue running.
    • Do not use external libraries; keep the program in one .ino file.
    • Add clear comments explaining each part of the logic.
    • Add a test function that changes the breathing speed and prints the result.

    Result: link

  2. You are an embedded-systems engineer.

    Generate a program for an ESP32 that runs in the Arduino IDE and meets these requirements:

    1. Red, amber and green LEDs are connected to GPIO 14, 27 and 26 respectively. HIGH turns an LED on and LOW turns it off.
    2. Use this sequence: red for 3 seconds → red and amber for 1 second → green for 3 seconds → amber for 1 second. Then return to red and repeat.
    3. Do not use delay(); use millis().
    4. Do not use external libraries; use a single .ino file.
    5. Add clear comments explaining each part of the logic.
    6. At the top of the program, include the generating prompt, date, tool used, copyright and other customary metadata.

    Result: link

  3. You are an embedded-systems engineer.

    Generate a program for an ESP32 that runs in the Arduino IDE and meets these requirements:

    1. Build a wired quiz buzzer. Contestants race to press a button; the corresponding LED lights and the system locks so nobody else can answer.
    2. Inputs: four buttons connected to GPIO 32, 33, 25 and 26, coloured red, green, blue and white respectively.
    3. Outputs: three LEDs connected to GPIO 19, 18 and 5, coloured red, green and blue respectively.
    4. When a contestant presses a button—for example, the red button on GPIO 32—the corresponding LED—for example, the red LED on GPIO 19—lights. The system then locks, and the green and blue contestants' buttons have no effect. The white button on GPIO 26 must remain active.
    5. The white button is Reset. Pressing it unlocks the system and starts the next round.
    6. Do not use delay(); use millis().
    7. Do not use external libraries; use a single .ino file.
    8. Add clear comments explaining each part of the logic.
    9. At the top of the program, include the generating prompt, date, tool used, copyright and other customary metadata.

    If anything is unclear, do not guess or generate code yet. Ask me follow-up questions first.

    Result: link. This result raised a few questions, so I continued the conversation with follow-up prompts.

Conclusion ​

  • Vibe coding does not mean “not writing programs.” It redirects human effort towards defining the problem, acceptance testing and risk management, while an agent handles repetitive low-level work.
  • Delivering something reliable in the real world depends on a clear PRD, repeatable tests and review habits, not on accepting every suggestion.

Translation notice: This English page was generated automatically by AI and has not yet been reviewed by a human. It will be checked and revised page by page when time permits.

Last updated: