AI Maker Project Development Communication (Part 4): The Complete Process of AI-Assisted Development for ESP32 Maker Projects (Part 1)

Hello to all friends following Taiji Maker!

Welcome to the fourth article in the “AI Maker Project Development Communication” series. In the previous three articles, we discussed:

  1. Should we use AI collaborative programming?

  2. Which AI-assisted programming IDE is most suitable for Arduino maker project development?

  3. Which domestic large model in Trae CN is best for writing Arduino code?

If you have read the previous content, I believe you have a preliminary understanding of AI-assisted development and have installed Trae CN, mastering how to manually select models to write code.

Today, we will discuss a basic process we adopt when using AI to assist in developing maker projects through an example project, hoping to inspire and help you. Of course, if after reading our introduction, you feel you have better solutions or ideas, we also welcome you to share your valuable experiences in the comments section!!

Back to the topic, let me first introduce the main stages we usually divide the entire development process into when using AI to assist in developing maker projects:

  1. Planning: Clarifying requirements and determining the project plan

  2. Generation: Describing requirements to AI and letting it write code

  3. Debugging: Checking and fixing errors, verifying code functionality

  4. Optimization: Improving experience and enhancing performance

In the following introduction, I will explain how to communicate with AI in each of the above stages, how AI might respond, and what to pay attention to.

Alright, let’s get started!

Example Project Introduction

To better help you understand the development process, let’s assume we need to develop an “AI Plant Growth Control System” with AI assistance.

This system allows users to input the names of plants they want to grow into the ESP32; then, the ESP32 will connect to the internet to call the AI platform to obtain suitable growth parameters for that plant; subsequently, the ESP32 will use these parameters as reference values to monitor the growth environment of the plants in real-time and automatically control related devices to provide a suitable growth environment for the plants.

AI Maker Project Development Communication (Part 4): The Complete Process of AI-Assisted Development for ESP32 Maker Projects (Part 1)

Of course, there are many areas in this project that can be improved and adjusted, but please note that the core of this article is to introduce the process of developing maker projects, so this example project is merely for illustrative purposes, and to truly implement an AI plant growth control system, more complex functions and control processes will certainly be needed.

Now that we have clarified our project, let’s start the first phase of work!

Phase One: Planning — Turning Ideas into Clear Tasks

The core of this phase is to establish a good “communication foundation” with AI, allowing it to thoroughly understand your project goals and hardware/software environment, so that the generated code will not deviate from the direction.

This phase is usually divided into three steps, each with a clear focus:

  • Step 1: Introduce the project — Provide AI with all the core information and hardware/software conditions of the project

  • Step 2: Discuss and communicate — Listen to AI’s questions and suggestions, supplement details, and resolve discrepancies

  • Step 3: Confirm the plan — Formulate the final implementation plan to lay the foundation for code generation

Let’s discuss these steps in detail.

Step 1 of Phase One: Introduce the Project — Provide AI with a “Project Specification”

In this step, we will have a preliminary communication with AI regarding our requirements and hardware/software environment, giving an overall introduction to our project. This is very much like creating a “specification” for our project, allowing AI to understand what exactly we want to establish.

This step is crucial because it determines the direction of the entire project; it can be said to set the major direction for the entire project development. If the direction is not correct, it is very likely to lead to a situation where we are working hard but going in the wrong direction, and we will not be able to achieve our project no matter how hard we try.

To illustrate, I will provide you with the preliminary communication prompt information for the “Smart Plant Growth System” when communicating with AI (for better reading experience, I have marked this part in blue italics to distinguish it from the main text):

—Prompt Information Start—

Please help me establish an ESP32 Arduino project. Here is the basic information of the project:

## Project Name

AI Plant Growth System

## Project Overview

Implement an ESP32 Arduino project where users provide the name of the plant, and the ESP32 retrieves the required temperature and soil moisture information through the AI platform API. The ESP32 will control related devices based on this information to achieve intelligent planting.

## Hardware Used in the Project

– YL-69 Soil Sensor Module (connected to GPIO34 of ESP32)

– DHT11 Temperature and Humidity Sensor (connected to GPIO4 of ESP32)

– Water Pump Control Relay: connected to GPIO13 of ESP32, high level turns on the water pump, low level turns off the water pump

## Network Environment Information of the Project

### WiFi Connection Information

– WiFi Name: taichimaker

– WiFi Password: wifi-password

## AI Platform API Interaction Information

– Platform Name: Silicon Flow

– API Endpoint URL: https://api.siliconflow.cn/v1/chat/completions

– API Key: 123456789abcdabcd

– Model Code: Qwen/Qwen3-8B

## Reference Materials

Official API documentation URL: https://docs.siliconflow.cn/cn/userguide/introduction

These are some preliminary thoughts I have about this project. After you read it, I would love to hear your thoughts: Is there anything unclear or uncertain? Or do you think there are areas for improvement? Feel free to let me know, and we can discuss it together!

Please note that we are still in the discussion phase, so there is no need to output or generate code yet; we will generate code after we confirm the project plan.

—Prompt Information End—

By reading the above prompt information, I believe you can see that we have provided important information needed for project implementation in a clear format to AI. This information will provide good guidance for AI development.

Some friends may find the above “Project Specification” too complicated, but actually, “sharpening the axe does not hinder the work of cutting wood” — the more complete the information, the lower the probability of AI stumbling in the future.

Here are a few practical tips to share:

  • If you are unsure about which hardware to use (for example, not knowing which soil sensor to choose), you can directly ask AI for recommendations, such as writing “Please recommend a soil moisture sensor suitable for ESP32 and the wiring pins” in the “Hardware Used in the Project” section;

  • Clearly specifying hardware connections (for example, “YL-69 connected to GPIO34”) allows AI to directly generate the corresponding pin definition code without you having to modify it later;

  • Providing reference materials (such as API documentation) allows AI to accurately call interfaces, avoiding errors due to AI not understanding the specific API interface rules we want to use; this step is crucial because AI is not omnipotent, and sometimes we must provide enough background knowledge for it to perform better.

  • Finally, emphasizing “do not generate code yet, just discuss” is to resolve all questions first — if we wait for AI to generate code and then change requirements, it may require starting over, which is more time-consuming.

To make it easier for you to directly apply, we have organized a general template that you can fill in according to your project (the following blue text content):

—Prompt Information Template Start—

## Project Name

[Put the project name here]

## Project Overview

[Briefly describe the purpose of the project here]

## Hardware Used in the Project

[List the hardware information for the project here, making sure to inform AI of the specific hardware connection information to facilitate code generation]

## Network Environment Information of the Project

### WiFi Connection Information

[Put the WiFi connection information here]

## AI Platform API Interaction Information

[Put the AI platform API interaction information here]

## Reference Materials

[Put the reference materials needed for the project here]

These are some preliminary thoughts I have about this project. After you read it, I would love to hear your thoughts: Is there anything unclear or uncertain? Or do you think there are areas for improvement? Feel free to let me know, and we can discuss it together!

Please note that we are still in the discussion phase, so there is no need to output or generate code yet; we will generate code after we confirm the project plan.

—Prompt Information Template End—

Step 2 of Phase One: Discuss and Communicate — “Hashing Out” Details with AI

In this step, we will discuss the specific plan for establishing the project with the AI model. We can submit the “Project Specification” established in Step 1 to the AI model.

However, please note that before submitting, we need to change the collaboration mode of Trae CN to chat mode. If you do not know how to do this, you can refer to the following screenshot instructions:

1. Open the mode switch panel of Trae CN ↓AI Maker Project Development Communication (Part 4): The Complete Process of AI-Assisted Development for ESP32 Maker Projects (Part 1)2. Switch Trae CN to Chat modeAI Maker Project Development Communication (Part 4): The Complete Process of AI-Assisted Development for ESP32 Maker Projects (Part 1)3. After switching to “Chat” mode, you can start the conversationAI Maker Project Development Communication (Part 4): The Complete Process of AI-Assisted Development for ESP32 Maker Projects (Part 1)Some friends may wonder why we need to switch Trae CN to Chat mode here? Because doing so can avoid ineffective operations and allow AI to focus on core discussions.

To better illustrate this issue, I will explain the basic functions of the two modes:

  • Chat Mode: Chat mode focuses more on discussing requirements with users, refining project plans, or allowing users to ask questions and consult on issues during project implementation. The core of Chat mode is “dialogue interaction”;

  • Builder Mode: Builder mode focuses more on generating or modifying code based on user input requirements. Therefore, in Builder mode, even if we just want to discuss the plan with AI, Trae CN may tend to generate code prematurely.

Therefore, when we just want to submit the project introduction to AI, we should choose Chat mode.

To help you better understand the workflow of the AI model, here is the response I received after submitting the “Project Specification” established in Step 1 to the AI model while writing this article, provided here for your reference (the following blue text content is the AI model’s response content):

—AI Response Content Start—

Thank you for sharing this project idea for the AI Plant Growth System! This is a very creative and practical IoT project. Let me analyze your plan and provide some thoughts and suggestions:

## Project Highlights

1.**Strong Practicality**: Combining AI technology with actual planting needs addresses common issues in plant care

2.**Reasonable Hardware Configuration**: The YL-69 soil sensor, DHT11 temperature and humidity sensor, and water pump control relay are the basic components for achieving automatic irrigation

3.**AI Integration**: Utilizing large language models to acquire plant care knowledge enables the system to adapt to the needs of different plants

## Issues to Consider

1.**API Call Frequency**: The Silicon Flow API may need to consider call frequency limits and cost issues, especially when frequently querying plant information

2.**Offline Functionality**: If the WiFi is interrupted, should the system have a basic default irrigation strategy?

3.**User Interaction Method**: How will users input the plant name? Is it through serial, Bluetooth, web interface, or other means?

4.**Data Persistence**: Should the acquired plant care information be stored on the ESP32 to avoid calling the API every time?

## Possible Improvement Directions

1.**Add More Sensors**: Consider adding a light sensor, as light is also a key factor in plant growth

2.**Local Knowledge Base**: Pre-storing basic care information for common plants can reduce API calls

3.**User Feedback Mechanism**: Add buttons or interfaces that allow users to manually intervene or adjust irrigation strategies

4.**Data Logging**: Consider recording environmental data and irrigation history to help optimize plant care strategies

5.**Multi-Plant Support**: If expanding to multiple plants in the future, how to manage and differentiate the care needs of different plants?

## Technical Implementation Considerations

1.**ESP32 Resource Limitations**: The ESP32 has limited memory, and memory management needs to be considered when processing API responses and storing data

2.**Error Handling**: Mechanisms for handling network request failures, sensor malfunctions, etc.

3.**Power Management**: If powered by batteries, low-power design needs to be considered

What do you think of these considerations? Are there other aspects you would like to discuss further? We can work together to refine this project plan.

—AI Response Content End—

From the above content, we can see that after receiving our “Project Specification,” the AI model did not rush to generate code but instead engaged in dialogue with us, raising questions and suggestions. Next, I will analyze and discuss the AI’s response content and how I replied.

First, let’s look at the “Project Highlights” summarized by AI.

For the “Project Highlights” section, we do not need to overly concern ourselves with it. This kind of commercial flattery is a characteristic feature implanted in all AI model developers, aimed at enhancing users’ goodwill towards AI, so basically, whenever we propose any project plan, the AI model will provide us with some positive affirmations.

However, the most critical content in the AI model’s feedback is the part after “Project Highlights.” That is, “Issues to Consider,” “Possible Improvement Directions,” and “Technical Implementation Considerations.” Because this content is what we did not clarify in the project introduction, yet the AI model needs us to provide further feedback to better realize this project.

Therefore, we must not be careless and must respond to each point, clarifying vague requirements, removing unnecessary parts, and adding what needs to be included. For your reference, the following blue text content is my response:

—Response Content Start—

Here are the responses to the issues you raised

Issue 1. **API Call Frequency**: The Silicon Flow API may need to consider call frequency limits and cost issues, especially when frequently querying plant information

Response: The ESP32 only needs to call the Silicon Flow API during the startup phase, that is, when running the setup function, so there is no issue with call frequency, and I will explain the specific reasons in detail later.

Issue 2. **Offline Functionality**: If the WiFi is interrupted, should the system have a basic default irrigation strategy?

Response: If the ESP32 successfully connects to WiFi, the LED connected to GPIO2 should remain on; if the WiFi connection fails, that LED should blink at 1-second intervals, and there is no need to implement a default irrigation strategy.

Issue 3. **User Interaction Method**: How will users input the plant name? Is it through serial, Bluetooth, web interface, or other means?

Response: After the ESP32 starts, during the execution of the setup function, it should output prompt text through the serial monitor, requesting the user to input the plant name. Once the user has finished inputting, the Silicon Flow API will be called to obtain suitable planting environment parameters (such as soil moisture, environmental humidity, temperature, etc.). After that, the ESP32 will enter the loop function and will no longer call the AI API.

Issue 4. **Data Persistence**: Should the acquired plant care information be stored on the ESP32 to avoid calling the API every time?

Response: No storage required.

Here are the responses to the possible improvement directions

Improvement 1. **Add More Sensors**: Consider adding a light sensor, as light is also a key factor in plant growth

Response: Okay. Please choose a light sensor module that you think is suitable and connect it to the GPIO pin of the ESP32 that you think is reasonable. The device can control an additional relay through GPIO16 to achieve light control.

Improvement 2. **Local Knowledge Base**: Pre-storing basic care information for common plants can reduce API calls

Response: Not needed.

Improvement 3. **User Feedback Mechanism**: Add buttons or interfaces that allow users to manually intervene or adjust irrigation strategies

Response: Not needed; this system is entirely controlled by AI and does not require manual intervention.

Improvement 4. **Data Logging**: Consider recording environmental data and irrigation history to help optimize plant care strategies

Response: Not needed.

Improvement 5. **Multi-Plant Support**: If expanding to multiple plants in the future, how to manage and differentiate the care needs of different plants?

Response: This system only supports a single variety of plants.

Here are the responses to the technical implementation considerations

Implementation Consideration 1. **ESP32 Resource Limitations**: The ESP32 has limited memory, and memory management needs to be considered when processing API responses and storing data

Response: Yes, please pay attention to this.

Implementation Consideration 2. **Error Handling**: Mechanisms for handling network request failures, sensor malfunctions, etc.

Response: All failures can be notified to the user by blinking the LED on GPIO2.

Implementation Consideration 3. **Power Management**: If powered by batteries, low-power design needs to be considered

Response: This system does not use battery power.

If there are no more questions, please prepare a project implementation plan document based on the above response content. This document should detail each phase of project implementation as a guiding reference document to ensure that all document users can comprehensively and clearly grasp the content and requirements of project implementation.

If there are any questions, please communicate with me, and we need to confirm all issues clearly before proceeding with the preparation of the implementation plan document.

—Response Content End—

Usually, through the above question-and-answer interaction, we can completely resolve AI’s doubts. However, sometimes we may need multiple rounds of Q&A interaction to fully communicate our needs with AI, depending on the specific situation in our actual development.

In summary, in this step, we must clarify all of AI’s questions and clearly explain our demands to AI. Only then can we allow AI to generate a “project implementation plan” that can be practically used.

Step 3 of Phase One: Confirm the Plan — A “Practical Action Guide”

In the previous step, we had AI generate a project implementation plan. Here, I suggest you take a few minutes to review this document. Of course, you can choose to read it word for word or just skim through the core content. Some friends may find this step redundant, but it is necessary because it allows us to verify whether AI truly understands our needs.

Additionally, this “plan document” has the following functions:

  1. Facilitates subsequent modifications and adjustments: If issues are found after code generation, there is no need to re-discuss requirements with AI; just modify this document and send it to AI, and it can rewrite according to the new requirements;

  2. Serves as a reference for the future: For example, if you want to add features to the project months later and forget the previous implementation logic, this document can help you quickly recall.

Honestly, I usually just choose to browse through it and then move on to the next phase of work — after all, we have already discussed the requirements with AI in the earlier steps. Usually, by this point, AI can understand what we want quite well.

Considering the length of this article, we will pause here. In the next article, we will discuss the subsequent content.

Today, we focused on the first phase of developing ESP32 maker projects using Trae CN — the planning phase. We mainly discussed the three-step principle in this phase, which is:

  1. Clearly describe project requirements to AI

  2. Communicate and refine details with AI

  3. Confirm the final implementation plan document

In the next article, we will explain the workflow for code generation, debugging, and project optimization, including how to get AI to generate compilable code, how to collaborate with AI to resolve compilation errors or functional anomalies, and how to make the project run more stably and effectively.

Thank you for accompanying us on this journey of growth!

Leave a Comment