Submit

20 / 20

Pick and place

Coordinate a stepper base, servo arm and gripper in sequence.

Run this experiment →
ESP32 teaching illustration with module, GPIO headers and lesson components

Why it’s here

Choose the destination steps and run a pick, rotate, release cycle.

How it works

Coordinate a stepper base, servo arm and gripper in sequence. 90 degrees. Microstepping and mechanical gearing change the effective steps per turn on real hardware. This guided model targets the original ESP32 and Arduino-ESP32 3.x; radio, acoustics, loads and mechanics are simplified.

Try it

  1. Open this experiment
  2. Choose the destination steps and run a pick, rotate, release cycle.

Connections

  • GPIO 25 / 26 — STEP / DIR to stepper driver
  • GPIO 18 / 19 — Lift / gripper servos
  • External supply — Driver and servo power, common GND

Example sketch

#include <ESP32Servo.h>
Servo lift, grip;
// STEP/DIR driver: GPIO25/26. Full-step 200 steps/rev. Set current limit first.

void setup() {
  pinMode(25, OUTPUT); pinMode(26, OUTPUT);
  lift.setPeriodHertz(50); lift.attach(18, 500, 2400);
  grip.setPeriodHertz(50); grip.attach(19, 500, 2400);
}

void loop() {
  grip.write(20); lift.write(30); delay(600);
  grip.write(80); delay(600); lift.write(90); delay(600);
  digitalWrite(26, HIGH);
  for (int i=0; i<50; i++) {
    digitalWrite(25, HIGH); delayMicroseconds(1000);
    digitalWrite(25, LOW); delayMicroseconds(1000);
  }
  lift.write(30); delay(600); grip.write(20); delay(600);
  lift.write(90); delay(600);
  digitalWrite(26, LOW);
  for (int i=0; i<50; i++) {
    digitalWrite(25, HIGH); delayMicroseconds(1000);
    digitalWrite(25, LOW); delayMicroseconds(1000);
  }
}

Check your understanding

How far is 50 steps with 200 steps per turn?

Show the answer

90 degrees. Microstepping and mechanical gearing change the effective steps per turn on real hardware.

Sources

Arduino-ESP32 ↗ · GPIO reference ↗

MAKE A THOUGHTFUL CHOICE

Your shortlist, side by side.

Pricing models are indicative. Check each official website for current plans and limits.