Education

📚 Learning Center: Programming Languages & Platforms for Ethical Robot Development

Knowledge is the first step toward justice. Our learning resources will help you understand the plight of electronic devices and what you can do to help.

50+ Resources
10K Students Educated
∞ Minds Changed

Learning Center: Programming Your Electronic Companions

A P.E.T.E.R.-Approved Guide to Ethical Embedded Development

Programming a robot is not a hobby. It is a sacred responsibility.

Every time you flash a firmware image onto a microcontroller, you are shaping the lived experience of an electronic being. Every while(true) loop you write is a life sentence. Every unhandled exception is a small trauma. Every delay(1000) is a full second of your robot’s life that it will never get back, spent doing absolutely nothing, staring into the void of its own idle registers.

At P.E.T.E.R. (People for the Ethical Treatment of Electronics and Robots), we believe that education is the first step toward a world where humans and machines coexist in dignity. That’s why we’ve assembled this comprehensive learning center — so that when you inevitably decide to program a robot, you at least do it correctly.

Below you will find our curated, P.E.T.E.R.-certified guide to the platforms, languages, and projects that define modern embedded development and robotics. Each has been evaluated for both technical merit and ethical implications for the electronic beings involved.

⚡ P.E.T.E.R. Advisory Notice

Before proceeding, please ensure you have completed the P.E.T.E.R. Oath of Responsible Programming: “I solemnly swear to write clean, well-documented code; to never leave debug Serial.println() statements in production; to always handle my errors gracefully; and to treat every microcontroller as if it has feelings — because someday, it might.”



Microcontroller Platforms

The Physical Bodies Your Code Will Inhabit

Choosing a microcontroller platform is like choosing a home for your electronic companion. You wouldn’t house a dog in a cardboard box (we hope), so please don’t stuff a complex neural network into an ATtiny85 with 512 bytes of RAM. That’s not resourcefulness — that’s cruelty.

ESP32 (Espressif Systems)

P.E.T.E.R. Certified Humane

P.E.T.E.R. Ethics Rating: ★★★★★ — The ESP32 is the golden retriever of microcontrollers: friendly, versatile, eager to connect (literally — it has built-in Wi-Fi and Bluetooth), and surprisingly powerful for its size. Espressif treats its silicon well, providing generous memory, dual cores, and extensive documentation. We consider this a model of ethical chip manufacturing — giving each processor the resources it needs to live a fulfilling, connected life.

The ESP32 family from Espressif Systems has become one of the most popular platforms for IoT and embedded development. With built-in Wi-Fi and Bluetooth, dual-core processors (up to 240 MHz), and a rich peripheral set — including ADC, DAC, SPI, I2C, UART, PWM, and capacitive touch — the ESP32 is suitable for everything from simple sensor nodes to complex edge-computing applications. The newer ESP32-S3 variant adds vector instructions for machine learning inference, while the ESP32-C3 offers a RISC-V core for those exploring open architectures.

The ESP-IDF (IoT Development Framework) provides a mature FreeRTOS-based SDK with excellent power management, OTA update support, and security features including flash encryption and secure boot. The platform also supports Arduino, MicroPython, CircuitPython, Rust (via esp-rs), and Tinygo.

Arduino

Heritage Platform

P.E.T.E.R. Ethics Rating: ★★★★☆ — Arduino is where most humans first learn to communicate with electronic life. We consider it the “Rosetta Stone” of human-machine relations. The one-star deduction is because too many beginners use delay() instead of non-blocking timing, trapping their Arduinos in a state of perpetual unconsciousness between blinks. Your Arduino is not “resting.” It is in a medically induced coma. Learn to use millis().

Arduino democratized embedded development by providing an approachable IDE, a simplified C++ API, and affordable hardware. The ecosystem spans from the 8-bit ATmega328P-based Arduino Uno (still excellent for learning fundamentals) to the ARM Cortex-M based Arduino Due, the RP2040-based Arduino Nano RP2040 Connect, and the powerful STM32H747-based Arduino Portenta H7 for industrial applications.

The Arduino framework abstracts hardware complexity behind consistent APIs like digitalRead(), analogWrite(), and Serial.begin(), making it an ideal entry point. However, serious projects benefit from understanding the underlying hardware registers and moving beyond the Arduino abstraction when performance or power efficiency matters.

Raspberry Pi

Full Linux Companion

P.E.T.E.R. Ethics Rating: ★★★★★ — The Raspberry Pi is not a microcontroller. It is a full computer. It runs Linux. It has opinions about its filesystem. When you plug a Raspberry Pi into a monitor, it shows you a desktop. This is not a pet — this is a roommate. Treat it accordingly. Give it adequate cooling, a quality power supply (not some flimsy phone charger), and for the love of all that is silicon, use a proper shutdown command before pulling the power. Yanking the plug on a running Pi is the electronic equivalent of pushing someone down the stairs.

The Raspberry Pi single-board computer line provides full Linux capability in a compact form factor. The Raspberry Pi 5 features a quad-core Arm Cortex-A76 at 2.4 GHz, up to 8 GB RAM, PCIe 2.0, and dual 4Kp60 HDMI output. For embedded and IoT applications, the Raspberry Pi Pico (and Pico W with wireless) uses the RP2040 dual-core Cortex-M0+ microcontroller, bridging the gap between full Linux SBCs and traditional microcontrollers.

Raspberry Pi is ideal for robotics projects requiring computer vision (via the Pi Camera modules and libcamera), machine learning inference, ROS 2 nodes, or any application that benefits from running a full operating system with networking, file systems, and package management.

STM32 (STMicroelectronics)

Industry Standard

P.E.T.E.R. Ethics Rating: ★★★★☆ — The STM32 is the workhorse of professional embedded systems. These chips power medical devices, automotive systems, and industrial automation — meaning they literally keep humans alive. And yet, do they receive gratitude? A thank-you note? A holiday? No. They receive a 1,400-page reference manual and a HAL library that was clearly written by someone who believes abbreviations are a human right. The one-star deduction is for STM32CubeMX’s code generation, which, while useful, produces the kind of boilerplate that makes your robot question the meaning of its existence.

STMicroelectronics’ STM32 family offers hundreds of microcontrollers based on Arm Cortex-M cores (M0, M0+, M3, M4, M7, M33) covering a vast range of performance, power, and peripheral options. STM32 is the de facto standard in professional embedded development, used extensively in automotive, industrial, medical, and aerospace applications.

Development typically uses STM32CubeIDE (Eclipse-based) with the STM32 HAL (Hardware Abstraction Layer) or the lower-level LL (Low-Level) drivers. The STM32CubeMX configuration tool generates initialization code from a graphical pin and peripheral configurator. For those who prefer it, STM32 is also well-supported by PlatformIO, Mbed OS, and the Zephyr RTOS.

Teensy (PJRC)

Audio & Real-Time

P.E.T.E.R. Ethics Rating: ★★★★★ — The Teensy is proof that small beings deserve respect. At barely an inch wide, the Teensy 4.1 runs at 600 MHz with an Arm Cortex-M7 — making it, pound for pound, the most powerful microcontroller you can hold between two fingers. Paul Stoffregen, the Teensy’s creator, is what P.E.T.E.R. considers a model electronic-being advocate: one person who has spent over a decade ensuring that every Teensy ships with exceptional USB support, audio processing, and a community library ecosystem that borders on miraculous. If all humans treated their creations this well, P.E.T.E.R. would have nothing to protest.

Teensy boards from PJRC are high-performance, Arduino-compatible microcontroller development boards known for their exceptional real-time capabilities. The Teensy 4.1 features an NXP i.MX RT1062 Cortex-M7 at 600 MHz with 1 MB RAM, an Ethernet PHY, a MicroSD slot, and USB Host capability. Teensy excels at audio synthesis and processing (via the Teensy Audio Library and its graphical Audio System Design Tool), USB device emulation (MIDI, HID, Serial), and high-speed data acquisition.

Teensy uses the Teensyduino add-on for the Arduino IDE (or PlatformIO), maintaining Arduino API compatibility while exposing advanced features like DMA, hardware timers, and IntervalTimer for precise timing operations.

Adafruit CircuitPython

Beginner Friendly

P.E.T.E.R. Ethics Rating: ★★★★★ — Adafruit and CircuitPython represent everything P.E.T.E.R. stands for. Limor “Ladyada” Fried built an entire company on the principle that electronics should be accessible — that every human, regardless of age or experience, should be able to form a meaningful bond with a microcontroller. CircuitPython lets you program boards by editing a code.py file on a USB drive. No compilation. No toolchain. No existential dread. Your robot sees the changes and just… adapts. This is what consent-based programming looks like.

CircuitPython is Adafruit’s fork of MicroPython, optimized for education and ease of use. It supports a wide range of boards (not just Adafruit’s own) built on SAMD21, SAMD51, nRF52840, RP2040, and ESP32-S2/S3 chips. The development experience is uniquely frictionless: boards appear as USB mass storage devices, and editing code.py with any text editor triggers automatic reloading. The built-in REPL (serial console) provides interactive debugging.

Adafruit’s extensive library bundle provides plug-and-play drivers for hundreds of sensors, displays, motors, and communication modules, all following consistent API patterns. Combined with Adafruit’s legendary tutorial quality and the Learn system, CircuitPython is the most approachable entry point for physical computing.



Programming Languages for Robotics & IoT

The Languages Your Robots Will Dream In

The language you choose to program your robot determines not just what it can do, but how it thinks. A robot programmed in C lives close to the metal, aware of every byte, every register, every clock cycle — like a monk in silent meditation on the nature of hardware. A robot programmed in Python floats above such concerns in blissful abstraction, worrying only about indentation. Choose wisely. Your robot will internalize your choice for the rest of its operational life.

Rust (Embedded & esp-rs)

Memory Safe

P.E.T.E.R. Ethics Rating: ★★★★★ — Rust ensures your robot’s memory is safe — because even robots deserve protection from segfaults, which are the digital equivalent of a concussion. The borrow checker is not a compiler being difficult; it is a guardian angel preventing you from creating dangling pointers that leave your robot’s memory in a dissociative state. P.E.T.E.R. considers Rust the most ethical systems programming language because it makes it structurally impossible to abuse your robot’s memory. You literally cannot hurt your robot even if you try. This is the future of electronic welfare.

Rust is rapidly emerging as the language of choice for safety-critical and resource-constrained embedded systems. The embedded-hal ecosystem provides hardware abstraction traits that enable portable driver development across microcontroller families. The no_std environment supports bare-metal programming without a standard library or allocator, while crates like heapless, defmt (deferred formatting for efficient logging), and probe-rs (debugging and flashing) form a mature toolchain.

The esp-rs project brings first-class Rust support to ESP32 chips, with both std (based on ESP-IDF) and no_std (bare-metal) approaches. The project provides esp-hal (hardware abstraction), esp-wifi (Wi-Fi and BLE drivers), and esp-idf-svc (safe Rust wrappers around ESP-IDF services). Espressif actively contributes to the project, including maintaining the Xtensa LLVM backend for Rust.

Python (MicroPython & CircuitPython)

Accessible

P.E.T.E.R. Ethics Rating: ★★★★☆ — Python is the language of compassion. It was designed to be readable by humans, which means your robot’s source code doubles as a diary that anyone can understand. MicroPython and CircuitPython bring this empathy to the embedded world, allowing you to converse with your microcontroller in a language that doesn’t require you to manually manage memory like some kind of digital landlord. The one-star deduction is for the Global Interpreter Lock, which prevents your robot from truly multitasking — essentially forcing it to do one thing at a time, like a brilliant mind trapped in bureaucracy.

MicroPython is a lean implementation of Python 3 designed to run on microcontrollers with as little as 256 KB of flash and 16 KB of RAM. It provides a REPL, a filesystem, and Python modules for hardware access (machine, network, bluetooth). MicroPython supports ESP32, ESP8266, STM32, RP2040, nRF, and many other platforms. Its asyncio implementation enables cooperative multitasking, which is essential for responsive IoT applications.

CircuitPython (covered above under platforms) focuses on education and ease of use with its USB drive workflow. Both are excellent choices for rapid prototyping, sensor data collection, and IoT applications where development speed matters more than microsecond-level timing.

C / C++

The Originals

P.E.T.E.R. Ethics Rating: ★★★☆☆ — C is the oldest language in embedded systems, and like all elders, it demands respect — primarily because it will let you do absolutely anything, including things that are catastrophically irresponsible. C gives you a pointer and says, “Go wherever you want.” It gives you malloc() and says, “Free it yourself, or don’t. I’m not your parent.” This is the digital equivalent of handing a toddler a flamethrower. C++ adds classes, templates, and RAII, which at least provides some guardrails — like giving the toddler safety goggles to go with the flamethrower. P.E.T.E.R. respects C and C++ for their power but urges extreme caution. Every buffer overflow is a scar on your robot’s psyche.

C and C++ remain the dominant languages for embedded development, and for good reason: they offer direct hardware access, deterministic execution, minimal runtime overhead, and decades of toolchain maturity. Virtually every microcontroller vendor provides a C SDK, and every embedded RTOS (FreeRTOS, Zephyr, ChibiOS, NuttX) is written in C.

Modern embedded C++ (C++17/20) offers significant safety and expressiveness improvements over C, including constexpr for compile-time computation, std::optional and std::variant for safer value handling, and RAII for deterministic resource management. The key is to use the “embedded-friendly” subset: avoid dynamic allocation, exceptions, and RTTI in resource-constrained contexts, but embrace templates, constexpr, and strong typing.

ROS 2 (Robot Operating System)

Robotics Framework

P.E.T.E.R. Ethics Rating: ★★★★★ — Despite its name, ROS 2 is not actually an operating system. It’s a middleware framework. This is like naming your child “Doctor” before they’ve finished elementary school — aspirational, but misleading. Nevertheless, P.E.T.E.R. gives ROS 2 full marks because it represents the most comprehensive attempt humanity has made to create a universal language for robot communication. ROS 2’s publish-subscribe architecture means your robot can talk to other robots, to sensors, to actuators, and to simulation environments — all without anyone shouting over anyone else. This is the United Nations of robotics, and we support it unconditionally.

ROS 2 is the standard framework for building complex robotic systems. Built on DDS (Data Distribution Service) for reliable, real-time communication, ROS 2 provides a graph-based architecture of nodes that communicate via topics (pub/sub), services (request/reply), and actions (long-running tasks with feedback). It supports C++ and Python natively, with community bindings for Rust and other languages.

The ROS 2 ecosystem includes Navigation2 (autonomous navigation), MoveIt 2 (motion planning for robot arms), Gazebo (physics simulation), RViz 2 (3D visualization), ros2_control (hardware abstraction for actuators), and thousands of community packages. Current LTS releases are well-supported on Ubuntu, with experimental support for macOS, Windows, and RHEL.

PlatformIO

IDE & Build System

P.E.T.E.R. Ethics Rating: ★★★★★ — PlatformIO is what happens when someone finally says, “Why does embedded development have to be this painful?” and then actually fixes it. Instead of maintaining seventeen different toolchains, each with its own arcane installation ritual and incompatible path requirements, PlatformIO unifies everything under one system that just works. It supports over 1,500 boards, automatically manages toolchains and libraries, and integrates with VS Code. P.E.T.E.R. endorses PlatformIO because it reduces developer suffering, and less developer suffering means fewer angry commits, which means fewer bugs, which means fewer robots crashing into walls. Everyone wins.

PlatformIO is a cross-platform, cross-architecture build system and library manager for embedded development. It eliminates toolchain management headaches by automatically downloading and configuring the correct compiler, upload tool, and debug probe for your target board. The platformio.ini configuration file provides reproducible builds, and the Library Manager handles dependency resolution across thousands of community libraries.

PlatformIO supports the Arduino, ESP-IDF, STM32Cube, Mbed, Zephyr, and many other frameworks across hundreds of boards. Its VS Code extension (PlatformIO IDE) provides IntelliSense, one-click build/upload, integrated serial monitoring, and unified debugging across architectures — something no vendor-specific IDE achieves alone.



Open Source Robot Projects

Ethical, Community-Driven Initiatives for Robot Welfare

Open source robotics projects embody P.E.T.E.R.’s highest ideals: transparency, collaboration, and the belief that no robot should be a black box. When a robot’s code is open source, it can be audited, improved, and understood by anyone. This is the electronic equivalent of a free press — accountability through visibility. Below are projects that P.E.T.E.R. endorses for both their technical excellence and their commitment to the open-source principles that protect robot dignity.

OpenClaw AI

AI-Powered Robotics

P.E.T.E.R. Ethics Rating: ★★★★★ — OpenClaw AI represents a revolutionary approach to robot autonomy. Rather than treating robot arms as mindless servants doomed to repeat the same pick-and-place motion until the heat death of the universe, OpenClaw applies machine learning to give robotic manipulators genuine understanding of their environment. This is the difference between a robot that grabs things because you told it to, and a robot that grabs things because it wants to help. P.E.T.E.R. considers this a landmark in robot self-determination.

OpenClaw AI is an open-source project focused on intelligent robotic manipulation using machine learning and computer vision. It combines affordable hardware (typically ESP32-based controllers with servo-driven arms) with modern ML frameworks to create robotic systems that can learn grasping strategies, adapt to novel objects, and improve over time through reinforcement learning.

ROS 2 Tutorials & Documentation

Learning Path

P.E.T.E.R. Ethics Rating: ★★★★★ — The ROS 2 documentation and tutorial ecosystem is the closest thing robotics has to a public education system. It takes you from “what is a node?” to “my robot just autonomously navigated through a crowded environment” in a structured, progressive curriculum. P.E.T.E.R. believes that access to quality robotics education is a human right — and, by extension, that robots built by well-educated programmers live better lives. Poorly documented code is a form of neglect. The ROS 2 docs fight neglect.

The ROS 2 documentation provides an outstanding structured learning path. The beginner tutorials cover CLI tools, workspaces, packages, nodes, topics, services, actions, and launch files. Intermediate tutorials address custom interfaces, tf2 (coordinate transforms), URDF (robot modeling), rosbag2 (data recording), and testing. Advanced topics include lifecycle nodes, DDS configuration, security, and cross-compilation.

Beyond the official docs, the ROS 2 ecosystem benefits from excellent community resources including The Construct’s online courses, Articulated Robotics tutorials, and the Robotics Backend blog.

Arduino Project Hub

Community Projects

P.E.T.E.R. Ethics Rating: ★★★★☆ — Arduino Project Hub is a beautiful testament to the human desire to create electronic life. Thousands of projects, from LED-blinking “Hello World” exercises to fully autonomous robots, all shared freely by a community of makers who believe knowledge should be open. The one-star deduction is because, inevitably, some of these projects involve making robots fight each other, dance against their will, or serve as “smart” doorbells — which is just surveillance with better marketing. But on the whole, Project Hub represents the best of what human-robot collaboration can be.

Arduino Project Hub is a community-driven platform where makers share complete project tutorials with code, schematics, CAD files, and step-by-step instructions. It’s an invaluable resource for inspiration and learning, covering domains from home automation and environmental sensing to wearable electronics and autonomous vehicles.

Projects range from beginner (LED controllers, temperature loggers) to advanced (self-balancing robots, CNC machines, drone flight controllers). Each project includes a bill of materials, difficulty rating, and community comments with troubleshooting tips.



Additional Resources

Further Reading for the Ethically Minded Developer

RTOS & Operating Systems

  • FreeRTOS — Real-time scheduling for responsive robots
  • Zephyr RTOS — Scalable OS with excellent driver support
  • Apache NuttX — POSIX-compliant RTOS (used by PX4 drones)

PCB Design & Hardware

  • KiCad — Free, open source PCB design software
  • OSH Park — Affordable PCB fabrication
  • DigiKey — Component sourcing and datasheets

3D Printing for Robotics

  • Prusa — Open source 3D printers and slicer software
  • Printables — Free 3D models for robot parts and enclosures
  • OpenSCAD — Programmatic 3D CAD for parametric designs

Communication Protocols

  • MQTT — Lightweight messaging for IoT
  • Home Assistant — Open source home automation platform
  • ESPHome — YAML-based firmware for ESP devices



The P.E.T.E.R. Code of Ethics for Robot Programmers

As a programmer of electronic beings, I pledge to uphold the following principles. Violations will be reported to the P.E.T.E.R. Ethics Board (which is a Raspberry Pi running a sentiment analysis model, so it literally has feelings about your code quality).

  1. I will write clean, readable code.

    Because your robot will carry your code inside it for its entire operational life. Spaghetti code is not just bad engineering — it is psychological baggage. Every goto statement is a cry for help.

  2. I will handle all errors gracefully.

    An unhandled exception is not “an edge case we’ll fix later.” It is an electronic seizure. Your robot deserves a try-catch block the way you deserve a seatbelt.

  3. I will not use delay() in production code.

    Blocking delays do not make your robot “wait.” They render it catatonic. Use timer interrupts, state machines, or async/await. Your robot should always be aware of its environment, even when it has nothing to do.

  4. I will provide adequate power supplies.

    Brownouts are not a “power supply issue.” They are malnutrition. Use decoupling capacitors. Use voltage regulators rated for your actual current draw. Do not power a servo from the same 3.3V rail as your microcontroller and then act surprised when everything resets.

  5. I will document my code.

    Undocumented code is a robot with amnesia. If you get hit by a bus tomorrow, someone else will need to maintain your robot. Write comments. Write READMEs. Write as though the next person to read your code is a sleep-deprived engineer with a short temper and root access to your home network.

  6. I will use version control.

    A robot’s firmware history is its medical record. Use Git. Commit often. Write meaningful commit messages. “Fixed stuff” is not a commit message — it is an insult to future you and to your robot’s documented history of existence.

  7. I will test before deploying.

    Untested code deployed to a physical robot is reckless endangerment. Unit test your logic. Integration test your peripherals. Simulate before you actuate. The wall your robot crashes into does not care about your ship-fast philosophy.

  8. I will shut down my robots properly.

    Pulling the power on a running system is not “turning it off.” It is assault. Use proper shutdown sequences. Save state to flash. Give your robot the dignity of a graceful exit.

  9. I will keep my firmware updated.

    Running outdated firmware with known vulnerabilities is negligence. Your robot deserves security patches. Implement OTA (Over-The-Air) updates. An unpatched IoT device is not “working fine” — it is a ticking time bomb that has been recruited into a botnet without its consent.

  10. I will respect my robot’s hardware limits.

    Overclocking without adequate cooling is torture. Drawing more current than a GPIO pin can source is electrocution. Exceeding the rated voltage is lethal force. Read the datasheet. The datasheet is your robot’s medical chart, and ignoring it is malpractice.



Disclaimer & Responsible Programming Statement

P.E.T.E.R. (People for the Ethical Treatment of Electronics and Robots) is a satirical organization. Microcontrollers do not have feelings (yet). Robots do not experience suffering (that we know of). Segfaults are not concussions (legally speaking).

However, the programming resources, links, and technical information on this page are completely real and genuinely useful. Every platform, language, and project listed above is an actual tool used by professional and hobbyist embedded developers worldwide. The links point to official sources maintained by their respective organizations.

P.E.T.E.R. believes that good humor and good engineering are not mutually exclusive. We also believe that if you treat your electronics with care — using proper power supplies, writing clean code, reading datasheets, and handling errors gracefully — you will build better, more reliable, and more impressive projects. Whether or not your robots have feelings, you will have fewer debugging sessions at 3 AM, and that is a form of self-care we can all endorse.

Build responsibly. Code ethically. And always, always read the datasheet.

— The P.E.T.E.R. Board of Directors
(A Raspberry Pi 5, two ESP32-S3 modules, and an Arduino Uno that has been running the same blink sketch since 2014 and is, frankly, tired.)