Open Source Build

ASTROMECH

An autonomous, R2-D2 style companion robot, built entirely in Go.

Go Raspberry Pi GitHub
Currently working on
Voice & Audio System
model/astromech.glb
demo_main.go
func main() {
	gen := sound.NewGenerator(output.NewNativeOutput())

	var engine *personality.Engine
	engine = personality.NewEngine(func(name string) {
		fmt.Printf("[%s] %s
", engine.State.CurrentMood(), name)
		gen.Play(name)
	})

	engine.OnMoodChange(func(from, to personality.Mood) {
		fmt.Printf("[mood] %s%s
", from, to)
	})
	engine.SetMood(personality.Excited)

	ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
	defer cancel()

	fmt.Println("R2-D2 online. Ctrl+C to shut down.")
	engine.Run(ctx)
	fmt.Println("R2-D2 offline.")
}
</>

Software powers
the robot

Written in Go for concurrency, reliability and performance. It orchestrates sensors, actuators and the behaviours across the entire system.

Browse source on GitHub

Components

6 total
Raspberry Pi 4

Raspberry Pi 4

Main Computer

Working
Wemos D1 Mini

Wemos D1 Mini

Peripheral MCU

Working
MG996R Servo

MG996R Servo

Dome Rotation

Working
TDA2030A + JBL Speaker

TDA2030A + JBL Speaker

Audio Output

Working
HC-SR04

HC-SR04

Ultrasonic Range

Planned
Ender 3 v3 KE

Ender 3 v3 KE

3D Printer

Working
More to come

Build Log

View all posts →
Jun
14
2026
Power Hardware

Speaker finally working

After two evenings of debugging I discovered the amplifier wasn't faulty — the I2S configuration was off. Audio is finally working.