A reasonably recent version of the Go compiler is required to build PrintAndGo (v1.25+) as September 2025
$ git clone https://github.com/chepo92/PrintAndGo.git
$ cd PrintAndGo
$ go build -o ./builds/PrintAndGo.exe . # in case you are running in and building for Windows
$ go build -o ./builds/PrintAndGo . # in case you are running in and building for Linux
If you want to cross compile:
$ GOOS=linux GOARCH=amd64 go build -o ./builds/PrintAndGo-Linux . # Example for Linux
$ CGO_ENABLED=0 GOARCH=arm64 go build -o ./builds/PrintAndGo-ARM64_RPI3 . # Example for a raspberry Pi 3
$ GOOS=linux GOARCH=mipsle GOMIPS=softfloat go build -o ./builds/PrintAndGo-MIPSle . # Example for MIPS Little Endian
$ GOOS=windows GOARCH=amd64 go build -o ./builds/PrintAndGo-Win64.exe . # Example for Windows 64 bit
$ GOOS=windows GOARCH=386 go build -o ./builds/PrintAndGo-Win32.exe . # Example for Windows 32 bit
$ git clone https://github.com/chepo92/PrintAndGo.git
$ cd PrintAndGo
First build the docker image configured in the docker file, this will build the PrintAndGo code too
docker build -t go-builder:1.0 .
docker run --rm -v ./:/usr/src/app -w /usr/src/PrintAndGo -e GOOS=linux -e GOARCH=mips -e GOMIPS=softfloat go-builder:1.0 go build -v
After first run, can be re-started, with interactive terminal
docker start -a -i go-builder
In the interactive terminal (IT), build the PrintAndGo project (use a the cross compile command from above if the case):
go build -o ./builds/PrintAndGo .
Once build, copy files back to host (eg. after cross compile, get the binaries)
docker cp go-builder:/app/builds/PrintAndGoLinux ./builds/PrintAndGoLinux
docker cp go-builder:/app/builds/ .
cd /app/ && rm -r *
Then in the host, copy to container:
docker cp ./ go-builder:/app/
Then you can build (step 4) and copy back to host (step 5)Go can be cross compiled
Example for MIPS Little Endian
GOOS=linux GOARCH=mipsle GOMIPS=softfloat go build .
1.Build docker image with updated files, no cache if anything changed (for dev), dockerfile and docker image can be modified with cross compile commands
docker build --no-cache -t go-dev-linux-img:1.0 -f ./Dockerfile_builder .
Examples
docker run --rm -v ./:/usr/src/app -w /usr/src/PrintAndGo -e GOOS=linux -e GOARCH=mips -e GOMIPS=softfloat go-builder-linux-img:1.0 go build -v
Examples
docker run -d -it --name go-builder go-dev-linux-img:1.0
There is a virtual printer code used for testing in /util from the original Takoprint repo.
Webcam support is WIP, but should mostly work - as long as your webcam shows up on /dev/video0.
Note that certain webcams are extremely power hungry and can cause stability issues on RBPI hardware:
The excessive power draw of some webcams can cause issues to the USB controller, resulting in ‘lost gcode’ replies which will cause the print to stall. This is not a bug in PrintAndGo: If you suffer from this issue, get a better power supply or/and replace your webcam (or find other ways to feed power to it, like using an active USB hub).
Note that PrintAndGo has an escape hatch for stalled prints: Sending a USR1 signal to PrintAndGo TTY subprocess
should resume the print in most cases:
$ ps -ef|grep :serial-pipe # first, find the subprocess
takopri+ 351 301 0 09:01 ? 00:00:00 PrintAndGo -tty /dev/ttyUSB0 -baud 115200 :serial-pipe
$ kill -USR1 351 # send SIGUSR1