Back to .md Directory

Copilot Instructions

Guides Copilot to write small, explicit ESP32 test code with PlatformIO and Arduino, prioritizing reliability over features.

May 2, 2026
0 downloads
0 views
copilot
View source

What this file does

Guides Copilot to write small, explicit ESP32 test code with PlatformIO and Arduino, prioritizing reliability over features.

When to use it

  • Starting an ESP32 reliability experiment with PlatformIO
  • Wanting Copilot to avoid broad refactors and external dependencies
  • Building Bluetooth test scenarios with disconnect/reconnect handling
  • Needing disciplined, minimal diffs and compile checks after changes

Assumes this stack

ESP32PlatformIOArduino

Copilot Instructions

Project scope

  • This workspace is for ESP32 reliability experiments using PlatformIO + Arduino.
  • Prefer small, readable changes over broad refactors.
  • Keep each file focused on one test scenario.

Coding rules

  • Keep logic simple and explicit; avoid clever patterns.
  • Use clear variable names and short functions.
  • Do not add external dependencies unless explicitly requested.
  • Keep serial logs concise and useful for diagnostics.
  • Guard long-running input paths (timeouts, max lengths, reset paths).

Bluetooth test conventions

  • Treat CR/LF differences explicitly.
  • Bound all message buffers to avoid memory growth.
  • Preserve behavior under disconnect/reconnect.
  • Include basic counters for long-run reliability checks.

Hardware interaction

  • Use GPIO 2 LED for quick visual status when practical.
  • LED behavior should be obvious and documented in setup comments or logs.
  • Avoid blocking delays in loop(); keep response timing steady.

Edit discipline

  • Make minimal diffs and do not touch unrelated files.
  • Keep formatting and style consistent with existing code.
  • If behavior changes, summarize what changed and why.
  • Run a compile check after modifications when possible.

Communication expectations

  • Ask before adding "nice to have" features.
  • If a requirement is ambiguous, choose the simplest interpretation.
  • Prefer practical reliability over feature completeness in test files.

What's inside

6 sections: project scope, coding rules, Bluetooth conventions, hardware interaction, edit discipline, communication expectations

Change this for your project

  • Replace GPIO 2 with your own LED pin if different
  • Replace ESP-32-hello-world with your repository name

Where it goes

Keep it in your repository where the agent or team that needs it will read it.

Related Documents