jn Joey Neleber
← All projects
electronics

Electronics learning bench

Practice basic digital input/output with PlatformIO.

ArduinoPlatformIOC++
Actual Arduino source and excerpt of successful isolated PlatformIO compile output.
Actual Arduino source and excerpt of successful isolated PlatformIO compile output.

The idea

A deliberately basic electronics learning exercise: connect a physical input to a physical output and make the state visible through serial output. Small examples deserve a place in the archive because they show the initial layer of a technique. Here the source supports learning Arduino-style setup/loop execution, pin configuration, digital reads/writes and the PlatformIO build workflow for an ESP32 development board. It does not establish a custom circuit design or a completed hardware product.

How it works

Build the project for the configured esp32doit-devkit-v1 target using PlatformIO.

The code configures a button input on pin 22 and an LED output on pin 23, with serial output at 115200 baud.

In loop, a LOW reading lights the LED and prints a pressed message; otherwise the LED is turned off.

The new review compiles an isolated copy only. No board was connected, flashed or tested.

Inside the build

A hardware loop with visible feedback

setup initializes serial and configures the pins. loop reads the input and immediately writes an output state. Serial messages make the branch visible, useful when debugging the difference between software assumptions and wiring.

Board-specific build configuration

platformio.ini identifies Espressif 32, the DOIT ESP32 DEVKIT V1 board and Arduino framework. The isolated build reused installed PlatformIO tools and produced firmware.elf and firmware.bin without modifying the original project.

A useful warning in a small program

Compilation succeeds but warns that LED_BUILTIN is redefined. The source also comments about a pull-up while configuring INPUT, so the comment should not be mistaken for an enabled internal pull-up. Those are good concrete details for explaining this as an early exercise.

What I learned

Software meets electrical assumptions

The code assumes a LOW input means pressed, but verifying that requires the actual wiring and input bias. The build proves compile compatibility, not electrical behavior. Debounce, pull-ups and input stability are natural next topics; the existing code does not implement them.

Keeping a tiny exercise honest

The archive should name the small thing achieved rather than inflate it into an electronics system. A button-to-LED exercise is still evidence of learning the toolchain and digital I/O. Its original date and tutorial lineage remain unknown.

Project source ↗