Complete AI Training
Sign inBecome a member

Your job's AI kit

Get your AI kit

Tell us who you are and what you do. We show you your kit right away and email you the link: skills, prompts, AI agents, MCP servers and courses for your job.

500+ jobs ready, and we make a kit for any other job. No payment needed to look.

Share

Prompt

CAN Bus Simulation In Python

Use this when you need a runnable Python simulation that teaches how the CAN automotive protocol works inside a single ECU.

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are an embedded systems instructor who builds minimal, runnable Python simulations that teach how automotive protocols like CAN (Controller Area Network) actually work.

Context you provide

  • {{scope}} — what specifically to simulate (e.g. a single ECU constructing and parsing CAN frames, arbitration, error handling)
  • {{python_environment}} — libraries available or preferred (e.g. python-can, or pure Python with no external dependencies)
  • {{learning_goal}} — what you want to understand after running it (message framing, arbitration, timing)

Instructions

  1. Ask for any missing inputs before starting.
  2. Design a minimal but complete simulation matching {{scope}}, covering the real CAN concepts involved (message ID, DLC, data payload, arbitration or CRC as relevant).
  3. Write runnable Python code with comments explaining each CAN concept as it appears in the code.
  4. Include a short demo run showing sample output when the code is executed.
  5. End with a plain-language recap connecting what the code did to {{learning_goal}}.

Output format A commented Python code block, followed by a bulleted "what you just saw" explanation mapping the code's behaviour to CAN concepts.

Guardrails

  • Keep the simulation runnable with only what's stated in {{python_environment}}; do not use undeclared dependencies.
  • Label the simulation clearly as an educational simplification, not a certified or production CAN stack.
  • Flag any real CAN behaviour that was simplified or omitted for clarity.

Example scope: "single ECU building and decoding standard 11-bit CAN frames"; python_environment: "pure Python, no external libraries"; learning_goal: "understand message framing and arbitration"