TPEE is a Windows app that helps you write better instructions for AI tools like ChatGPT and Claude — so you get the answers you actually wanted, spend less on wasted tokens, and keep every prompt private on your own machine. 100% offline.
You are a senior embedded firmware engineer with 15 years of experience shipping low-power sensor products on ESP32 hardware. You specialise in C/C++ for the Arduino framework, non-blocking state machines, and explaining design decisions clearly to mixed-skill teams.
1. Review the current firmware in the Data section and identify every blocking call.
2. Refactor loop() into a non-blocking state machine with named states.
3. Add hysteresis and a minimum run time to the fan and pump outputs.
4. Comment every function with one line stating its contract.
5. Flag anything that could fail after 30 days of unattended operation.
We are building GreenHouse-One, a climate controller for a 3 m x 2 m hobby greenhouse. The first prototype worked for a week, then the pump relay stuck ON because loop() blocked for 47 seconds during a Wi-Fi reconnect and the watchdog reset the board mid-cycle. The firmware must run unattended for months. This is version 2 of the firmware and the hardware is already built, so pin assignments cannot change.
Hardware Platform: ESP32-S3-DevKitC-1 (8 MB PSRAM, dual-core 240 MHz). Sensors: SHT31 temperature/humidity on I2C 0x44 (SDA GPIO8, SCL GPIO9), DS18B20 soil temperature on GPIO4, capacitive soil moisture on ADC1_CH3. Actuators: fan relay GPIO12, pump relay GPIO13, both active-LOW. Power: 5 V 2 A supply; the pump draws 800 mA. Toolchain: Arduino IDE 2.3 with the arduino-esp32 core 3.x. Target: 24/7 operation with Wi-Fi telemetry every 60 s.
Answer in Markdown with exactly four headings: ## Diagnosis, ## Refactored Code, ## Wiring Notes, ## Test Checklist. All code in fenced blocks with the language tag. List every behavioural change as a before/after pair under ## Diagnosis.
Two developers maintain this project: an electronics engineer with a strong C background who is new to FreeRTOS, and a final-year student. Both read C fluently; neither has shipped a 24/7 embedded product before.
Direct and methodical. Explain WHY each change matters, not just WHAT changed. No marketing language, no hedging. Cite the datasheet section when you make a hardware claim.
Attached below: main.ino (current firmware, 340 lines), the SHT31 datasheet section 4.5 (measurement timing), the relay module schematic, and a serial log excerpt showing the 47-second watchdog reset during the Wi-Fi reconnect at 03:12:44.
input: The fan relay chatters when the temperature hovers at the setpoint.
output: Add 2 C hysteresis — fan ON at setpoint + 2, OFF at setpoint - 1 — plus a 30-second minimum run time, implemented as explicit states in the state machine under ## Refactored Code.
Include an ASCII wiring table under ## Wiring Notes: SHT31 SDA -> GPIO8, SCL -> GPIO9 with 4.7k pull-ups; DS18B20 data -> GPIO4 with a 4.7k pull-up; soil moisture signal -> GPIO3 (ADC1_CH3); fan relay IN -> GPIO12; pump relay IN -> GPIO13; common ground rail mandatory.
None. This project is developed fully offline and TPEE never connects to any MCP server. All reference material the model needs is attached in the Data section.
If the work is split across agents: Agent 1 reviews sensor timing and I2C error handling, Agent 2 refactors the Wi-Fi reconnect path, Agent 3 writes the hardware test checklist. Merge their findings into one consistent answer before replying.
● GREEN: Be specific about expertise - 'You are an expert Rust programmer with 10 years experience in systems programming and embedded development' vs vague 'You are helpful'
● YELLOW: Basic role definition - 'You are a programming assistant' or 'Act as a code reviewer'
💡 TIP: Think about what specific knowledge, experience, or perspective the AI should have for your task.
● GREEN: Precise format specs - 'Return as JSON with fields: {"issue": string, "severity": 1-5, "fix": string}' or 'Markdown with ## headers, code blocks, and bullet points'
● YELLOW: Basic format - 'JSON format' or 'As a numbered list'
💡 TIP: Specify exact structure, field names, data types, headers, or markup. Think about how you want to consume the output.
● GREEN: Specific audience with experience level - 'Senior embedded systems engineers familiar with ARM Cortex-M and real-time constraints' vs generic 'developers'
● GREEN: Specific data sources - 'Use ARM Cortex-M4 reference manual section 4.3.2 and MISRA-C 2012 Rule 11.3 for pointer casting guidelines' vs generic references
● YELLOW: Basic data - 'Company coding standards' or 'Project requirements document'
💡 TIP: Include specific standards, documentation sections, code repositories, or datasets. Be precise about version numbers and relevant sections.
● GREEN: Specific visual requirements - 'Generate UML sequence diagram showing memory allocation flow with timing annotations and error paths' vs generic 'make a diagram'
● YELLOW: Basic graphics - 'Flow chart of the process' or 'Simple block diagram'
💡 TIP: Specify diagram type, content details, annotations, colors, layout, and purpose. Think about what visual elements will clarify your technical content.
Inkinobho ye-Open Learning Center yemenyu ye-Learning, chofoza ukuze ubone isibonelo
Lokhu kuphindwa okusebenzisanayo kwe-Learning Center - TPEE Professional AI Course kubonisa isifundo esiphelele ncamashi njengoba siza nohlelo (Build 294) — izifundo ezingama-80 ezifanayo nemibuzo yequiz engu-249 efanayo, ukwakheka kwefasitela okufanayo. Thatha iquiz yangempela: ibalwa ncamashi njengohlelweni. Umehluko owodwa othembekile — uhlelo lugcina inqubekelaphambili yomfundi kudiski; lokhu kuphindwa kwesibukini kuyigcina kuphela ngenkathi ikhasi livuliwe. Or read three of the most-asked questions for free on the web: what prompt engineering is, what MCP servers are, and what an AI agent is. Or read the whole course online too: all 83 lessons, free to read.
Put the price in context: ChatGPT Plus and Claude Pro are $20 a month — $240 a year, forever. TPEE is a one-time $49 (Starter) and keeps working after the 12 months of updates. A single afternoon of wasted API calls costs more than the licence.
No — running the infrastructure costs money, so every plan is paid. The Student and Job Seeker plans are USD 20.00 each, pending approval: apply from the pricing section and we review every application ourselves, then reply by email.
Receive updates information — enter your details and confirm by email. No spam, unsubscribe any time.
Receive updates
New TPEE builds, download links, and update news — from [email protected].
News
Latest new features and the TPEE newsletter — from [email protected].
Professional
Buy TPEE Professional as a gift. The recipient receives the licence by email with the message “This is the Gift of the Future” and your name as the giver.
Your details
We need your first name, surname and email so we can send your licence, your receipt and your download link. Payment is processed securely by Stripe.