Firmware for RepRap printers and similar devices