Build an ESP32 emoji robot from a blank workbench
COMPLETE BUILD FROM ZERO PARTSA complete zero-part build: enclosure, power, ESP32, servo, face, all eleven wires, controller code and a real runtime recording.
Read the complete transcript and chapter guide
01 · Start with zero parts
This is a complete Spark build, beginning with an empty BotSims workbench. We add every component individually, connect every wire, write the controller and run it. The recording keeps all build operations, with pauses trimmed and playback paced for this explanation. No robot preset or assembled module is imported.
02 · Find the parts
Open Components to browse the library. Search narrows the list, and the model badges distinguish behavioral components from geometry. Spark needs an enclosure, a two cell battery, a five volt regulator, an ESP32, a servo and an OLED face. We will use the supported virtual interfaces.
03 · Add the enclosure
Search for Emoji enclosure and press Add. This is the first component in an otherwise empty scene. New loose parts start on the ground. Inspector shows dimensions, mass, position and physical attachment. The yellow enclosure will support this small tabletop companion.
04 · Mount battery and regulator
Anchor the enclosure to the world for a stationary desktop demonstration. Choose On Emoji enclosure in the new component placement selector. Add the battery and regulator separately. Use Inspector position fields, in metres, to arrange them. A physical mount makes parts move together; it never creates an electrical connection.
05 · Install ESP32, servo and face
Add the ESP32 DevKit, position servo and OLED display one at a time. Set their positions using the same Inspector fields. Attach the display to the servo so its motion can be previewed. The rest of the electronics remain mounted on the enclosure. Fit brings the whole assembly into view.
06 · Switch to precise wiring
Open Wiring. All electrical components already appear because they belong to the project, but none has a complete circuit yet. Canvas supports dragging or clicking pins. For this first build, choose List and expand Connect using pin selectors, which makes exact terminal selection straightforward.
07 · Connect all power and grounds
Connect battery positive to regulator input, and battery ground to regulator ground. Connect the regulator five volt output to the ESP32 supply, servo supply and display supply. Connect each device ground back to battery ground. These eight connections establish the supply rails and a common reference. Do not feed the display directly from the battery.
08 · Add I squared C and servo PWM
Connect ESP32 SDA to display SDA, and SCL to SCL. Connect virtual servo channel one to the servo PWM input. The completed robot now has eleven wires. Canvas shows the finished network, and the wiring status reports no modeled electrical conflicts or unwired parts. Virtual aliases are not verified ESP32 hardware pin assignments.
09 · Write the controller
Open Code and replace the starter program. The step function stops the wheels, checks for brownout, cycles three face expressions and commands the installed servo by its exact part identifier. A sine wave changes the normalized servo target smoothly. Log messages appear only when the expression changes. The source is included in the downloadable project.
10 · Enable motion of attached parts
In the servo Inspector, enable Move attached parts and choose the Y motion axis. This explicit switch previews the mounted face turning with the servo. It is forward kinematics: collision shapes and inertia remain at the reference pose. It does not prove actuator torque, dynamic joint loading or a physically balanced mechanism.
11 · Run the new robot
Hide the side panels to give the robot more room, select Front view and press Run. This is the actual robot that we just assembled and wired. The display changes expressions and its servo turns the face. Physics runs at one hundred twenty steps per simulated second; the isolated JavaScript controller runs twenty times per simulated second.
12 · Save the finished project
Pause and choose Export project. The portable robot JSON contains all six parts, eleven wires, physical attachments, servo preview settings and controller source. Auto save protects the current project in this browser; an exported file lets you restore it later or on another device. Open or download this exact finished build below the video.