Coming Soon

This project is being tested and polished. Check back soon!

Beginnerongoing12+No extra parts needed

AI Prompt Cheat Sheet for ESP32 — Your Free Coding Tutor

You do not need to memorize code. You do not need to read a 600-page textbook. You do not need to already know what #include means. You just need to know what you want your project to do — and then ask AI to help you build it.

This page gives you the exact prompts that work. Copy them, paste them into ChatGPT or Claude, and start building real things today.


Why AI Is Your Best Friend for ESP32

Here is something most people do not tell beginners: professional electronics engineers use AI every single day. They describe what they want, get a first draft from the AI, then tweak it. This is the actual workflow used in real companies right now.

So when you use ChatGPT or Claude to help you write ESP32 code, you are not taking a shortcut. You are doing it the modern way.

Here is why AI is the perfect tutor for this:

  • You do not need to memorize anything. Forget syntax. Forget library names. Forget pin numbers. AI knows all of it.
  • AI knows every library, every function, every pin. The ESP32 ecosystem has hundreds of libraries. No human remembers all of them. AI does.
  • It never gets annoyed. Ask the same question five different ways. Ask it to explain things again. Ask it to make the code simpler. It will never sigh, check its phone, or tell you to just Google it.
  • It explains as it codes. Ask it to add comments to every line and you get free, personalized teaching built right into the code you are actually running.

The only thing AI cannot do is know exactly what hardware you have in front of you. That is your job — tell it precisely what board you have and what is connected.


The Magic Prompt Template

This is the prompt structure that produces working code almost every time. Fill in the brackets, delete the parts that do not apply, and paste it in.

I have an ESP32-S3 dev board connected via Arduino IDE 2.x.
[Optional: I also have a SSD1306 OLED display connected via I2C on pins 21/22]
[Optional: I also have a DHT22 temperature sensor on pin 4]

Write me Arduino code to: [describe what you want]

Requirements:
- Include all #include statements
- Use pin numbers that work with ESP32-S3
- Add comments explaining what each section does
- Keep it simple, I'm a beginner

Why this works: you are giving the AI exactly the information it needs — board model, IDE version, connected hardware, and a clear goal. Most failed AI prompts fail because they leave one of these out. “Write code for ESP32” is not enough. “Write code for my ESP32-S3 DevKitC connected to a DHT22 on pin 4, using Arduino IDE 2.x” gets you something you can actually upload and run.


30 Ready-to-Use Prompts

These are organized from no extra hardware to more complex builds. Start at Level 1 and work your way down as you add parts.


Level 1 — Just the Board (no extra parts needed)

You only need your ESP32 dev board and a USB cable for these. A great place to start.

1. SOS Blink

“I have an ESP32-S3 dev board in Arduino IDE 2.x. Write me Arduino code to blink the built-in LED in SOS morse code pattern. Add comments explaining what each section does. Keep it simple, I’m a beginner.”

2. WiFi Scanner

“I have an ESP32-S3 dev board in Arduino IDE 2.x. Write me Arduino code to scan for nearby WiFi networks and print each one to Serial Monitor with its signal strength in dBm. Keep it simple, I’m a beginner.”

3. Phone-Controlled LED

“I have an ESP32-S3 dev board in Arduino IDE 2.x. Write me Arduino code to create a web server with a button that toggles the built-in LED on and off. I want to control it from my phone’s browser. Keep it simple, I’m a beginner.”

4. Internal Temperature

“I have an ESP32-S3 dev board in Arduino IDE 2.x. Write me Arduino code to read the ESP32’s internal temperature sensor and print the value to Serial Monitor every second. Keep it simple, I’m a beginner.”

5. Create Your Own Access Point

“I have an ESP32-S3 dev board in Arduino IDE 2.x. Write me Arduino code to create a WiFi access point named ‘MyESP32’ with the password ‘helloworld’. Print the IP address to Serial Monitor. Keep it simple, I’m a beginner.”

6. Smooth LED Fade (PWM)

“I have an ESP32-S3 dev board in Arduino IDE 2.x. Write me Arduino code to make the built-in LED fade in and out smoothly using PWM. Keep it simple, I’m a beginner.”

7. Random Joke Fetcher

“I have an ESP32-S3 dev board in Arduino IDE 2.x with WiFi credentials already set. Write me Arduino code to fetch a random joke from a free public joke API and print it to Serial Monitor. Keep it simple, I’m a beginner.”

8. Hello World Web Page

“I have an ESP32-S3 dev board in Arduino IDE 2.x. Write me Arduino code to create a simple HTTP web server that shows ‘Hello World’ when I visit its IP address in any browser on my network. Keep it simple, I’m a beginner.”

9. Bluetooth Keyboard

“I have an ESP32-S3 dev board in Arduino IDE 2.x. Write me Arduino code to make the ESP32 act as a Bluetooth keyboard. When I press the BOOT button, it should type ‘Hello’ on any paired device. Keep it simple, I’m a beginner.”

10. Bluetooth Scanner

“I have an ESP32-S3 dev board in Arduino IDE 2.x. Write me Arduino code to scan for nearby Bluetooth devices and print their names and MAC addresses to Serial Monitor. Keep it simple, I’m a beginner.”


Level 2 — With an OLED Display

These require an SSD1306 OLED display (very common, usually under $3). Connect it via I2C on pins 21 (SDA) and 22 (SCL). The Adafruit SSD1306 library works great.

11. Hello World on OLED

“I have an ESP32-S3 dev board in Arduino IDE 2.x. I also have an SSD1306 OLED display connected via I2C on pins 21/22. Write me Arduino code to display ‘Hello World’ on the OLED. Include all #include statements. Keep it simple, I’m a beginner.”

12. Internet Clock

“I have an ESP32-S3 dev board in Arduino IDE 2.x and an SSD1306 OLED display on pins 21/22. Write me Arduino code to sync time from the internet using NTP and display a live digital clock on the OLED. Keep it simple, I’m a beginner.”

13. WiFi Signal Bar Graph

“I have an ESP32-S3 dev board in Arduino IDE 2.x and an SSD1306 OLED display on pins 21/22. Write me Arduino code to display the current WiFi signal strength as a bar graph on the OLED, updating every second. Keep it simple, I’m a beginner.”

14. Bouncing Ball Animation

“I have an ESP32-S3 dev board in Arduino IDE 2.x and an SSD1306 OLED display on pins 21/22. Write me Arduino code to animate a bouncing ball on the OLED display that bounces off the edges. Keep it simple, I’m a beginner.”

15. System Status Screen

“I have an ESP32-S3 dev board in Arduino IDE 2.x and an SSD1306 OLED display on pins 21/22. Write me Arduino code to display the ESP32’s free heap memory, uptime in seconds, and WiFi connection status on the OLED. Keep it simple, I’m a beginner.”

16. Live Weather Display

“I have an ESP32-S3 dev board in Arduino IDE 2.x and an SSD1306 OLED display on pins 21/22. Write me Arduino code to fetch the current temperature for Bratislava from the Open-Meteo API (it’s free, no API key needed) and show it on the OLED. Keep it simple, I’m a beginner.”

17. Pixel Art Tool

“I have an ESP32-S3 dev board in Arduino IDE 2.x and an SSD1306 OLED display on pins 21/22. Write me Arduino code for a pixel art tool where I type x,y coordinates in Serial Monitor to toggle pixels on the OLED display. Keep it simple, I’m a beginner.”

18. WiFi QR Code

“I have an ESP32-S3 dev board in Arduino IDE 2.x and an SSD1306 OLED display on pins 21/22. Write me Arduino code to generate and display a QR code on the OLED that encodes my WiFi network name and password so guests can scan it to connect. Keep it simple, I’m a beginner.”

19. Countdown Timer

“I have an ESP32-S3 dev board in Arduino IDE 2.x and an SSD1306 OLED display on pins 21/22. Write me Arduino code for a 60-second countdown timer displayed on the OLED. Pressing the BOOT button starts and resets the timer. Keep it simple, I’m a beginner.”

20. Scrolling Text Marquee

“I have an ESP32-S3 dev board in Arduino IDE 2.x and an SSD1306 OLED display on pins 21/22. Write me Arduino code to display a scrolling text marquee on the OLED. The text should be defined in a variable at the top of the sketch. Keep it simple, I’m a beginner.”


Level 3 — With Sensors

These add real-world sensing. Each prompt tells the AI exactly which sensor and which pin so you get working code on the first try.

21. Temperature and Humidity on OLED

“I have an ESP32-S3 dev board in Arduino IDE 2.x, an SSD1306 OLED display on pins 21/22, and a DHT22 temperature and humidity sensor on pin 4. Write me Arduino code to read the temperature and humidity every 2 seconds and display them on the OLED. Include all #include statements. Keep it simple, I’m a beginner.”

22. Motion Detector with Buzzer

“I have an ESP32-S3 dev board in Arduino IDE 2.x, a PIR motion sensor on pin 13, and a passive buzzer on pin 25. Write me Arduino code that triggers the buzzer for 1 second whenever motion is detected. Add comments to every line. Keep it simple, I’m a beginner.”

23. Ultrasonic Distance Meter

“I have an ESP32-S3 dev board in Arduino IDE 2.x, an HC-SR04 ultrasonic sensor with TRIG on pin 5 and ECHO on pin 18, and an SSD1306 OLED display on pins 21/22. Write me Arduino code to measure distance in centimeters and display it on the OLED. Keep it simple, I’m a beginner.”

24. Light-Controlled LED Brightness

“I have an ESP32-S3 dev board in Arduino IDE 2.x and an LDR (light-dependent resistor) connected to pin 34 with a voltage divider. Write me Arduino code to read the light level and use it to automatically adjust the brightness of the built-in LED using PWM. Keep it simple, I’m a beginner.”

25. Door Alarm with WiFi Notification

“I have an ESP32-S3 dev board in Arduino IDE 2.x and a magnetic door sensor connected to pin 27. Write me Arduino code that detects when the door opens and sends a notification to my phone using a free push notification service. Keep it simple, I’m a beginner.”


Level 4 — Combining Skills

These are bigger projects that combine WiFi, sensors, and displays. Use these when you are comfortable with the basics and want to build something impressive.

26. Live Sensor Web Dashboard

“I have an ESP32-S3 dev board in Arduino IDE 2.x and a DHT22 sensor on pin 4. Write me Arduino code to create a web server that shows a live dashboard with current temperature and humidity, accessible from any device on my WiFi network. The page should auto-refresh every 5 seconds. Keep it simple, I’m a beginner.”

27. Weather Station with Data Logging

“I have an ESP32-S3 dev board in Arduino IDE 2.x, a DHT22 sensor on pin 4, and an SSD1306 OLED display on pins 21/22. Write me Arduino code for a mini weather station that reads temperature and humidity every 5 minutes, shows current values on the OLED, and logs the last 10 readings to Serial Monitor. Keep it simple, I’m a beginner.”

28. Two ESP32 Boards Chatting (ESP-NOW)

“I have two ESP32-S3 dev boards in Arduino IDE 2.x, each with an SSD1306 OLED display on pins 21/22. Write me Arduino code for both boards to send and receive simple text messages between them using ESP-NOW (no router needed), and display received messages on the OLED. Keep it simple, I’m a beginner.”

29. Web-Controlled Servo Camera Pan

“I have an ESP32-S3 dev board in Arduino IDE 2.x and a servo motor on pin 15. Write me Arduino code to create a web interface accessible from my phone that lets me control the servo angle using a slider. Keep it simple, I’m a beginner.”

30. Pomodoro Timer

“I have an ESP32-S3 dev board in Arduino IDE 2.x, an SSD1306 OLED display on pins 21/22, a passive buzzer on pin 25, and an RGB LED with red on pin 26, green on pin 27, blue on pin 14. Write me Arduino code for a Pomodoro timer: 25 minutes work shown in green, then 5 minutes break shown in blue. Show the countdown on OLED and beep the buzzer when the timer switches. Keep it simple, I’m a beginner.”


When AI Gets It Wrong

AI is not perfect. Sometimes the code has a bug. Sometimes it uses the wrong pin name for your specific board. Here is exactly what to do in each situation — and spoiler: the answer is always “paste the problem back to AI and ask it to fix it.”

“The code doesn’t compile”

Copy the full error from the Arduino IDE bottom panel and send it back:

“I got this error when compiling: [paste error here]. My board is ESP32-S3 DevKitC. Fix it.”

Do not try to fix compile errors yourself at first. Just paste them straight back. AI is very good at reading error messages.

“It compiled but nothing happens”

This usually means a pin number mismatch or a missing Serial Monitor step:

“The code uploaded successfully but the LED doesn’t blink. My board is ESP32-S3 DevKitC-1. The built-in LED pin might be different. Can you check the pin number and also add Serial.println messages so I can see what the code is doing?”

“I don’t understand what the code is doing”

This is not a failure — this is the perfect learning opportunity:

“Explain this code to me line by line like I’m 14 years old and have never programmed before.”

Or paste a specific section you are confused about:

“What does this line do: Wire.begin(21, 22);”

“The AI gave me a library that doesn’t exist”

This happens occasionally. The fix:

“The library [library name] doesn’t appear in the Arduino Library Manager. Is there an alternative I can use instead? Or give me the exact name as it appears in the library manager search.”

General rule: always tell the AI your exact board model and exactly what hardware is connected. The more specific you are, the better the code.


Pro Tips for Getting the Most Out of AI

These small habits will make your sessions much more productive.

Start simple, add features one at a time. Do not ask for the full project in one prompt. Get the LED blinking first. Then add the OLED. Then add the sensor. AI is much better at adding one feature to working code than building ten features at once.

If the code is too long or confusing, say so directly:

“This code is too complex for me. Simplify it and remove any features that aren’t essential.”

Ask for comments on every line when you want to learn:

“Rewrite this code with a comment on every single line explaining exactly what it does.”

Save working code immediately. Before you change anything, copy the working version into a new folder. Name it something like project-oled-clock-working. You will thank yourself later.

Use AI to explain concepts too, not just write code:

  • “What is I2C and why does it only need 2 wires?”
  • “Why do I need a resistor with an LED?”
  • “What is the difference between delay() and millis() in Arduino?”
  • “What does void mean in Arduino C++?”

These concept questions are where AI tutoring beats YouTube — you get the exact explanation tailored to your level, right now, with follow-up questions allowed.

When code stops working after a change, ask:

“This code was working, then I added [what you added] and now it doesn’t work. Here is the full code: [paste]. What did I break?”


The Secret

Here is the thing most people do not realize: this is exactly how professional software engineers work. They describe what they want, get AI to write the first draft, then tweak it. The skill they are developing is not memorizing syntax — it is knowing precisely what to ask for. It is understanding their own hardware well enough to describe it clearly. It is reading output and knowing whether it makes sense.

You are doing the same thing right now, on your desk, with a $10 board and a free chatbot.

You are not cheating. You are learning the most valuable skill in modern engineering — knowing what to ask for, how to describe a problem clearly, and how to iterate when the first answer is not quite right. Every prompt you write, every error you paste back, every “explain this to me” request — that is real engineering practice.

The code is just the output. The thinking is the skill.


Need hardware to try these prompts? Check out our ESP32 Starter Kit guide with everything you need for under $25.

Affiliate disclosure: Some links on this page are affiliate links. If you buy through them, we may earn a small commission at no extra cost to you.