Skip to content
3D Printer Interface
JavaScript CSS Shell
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.

3D Printer Interface

3D Printer Interface using Node.js!


Status: Core functionality is now in place. Started to prepare technical documentation for UI integration. UI interface still under development (at the moment there are only some basic test functionalities)

  • Update 4 (19-Jan-2013)

    • Added documentation for the REST API interface (required for UI implementation)
    • Refactored core module configurations to use config/*.json files
    • Fixed issues #12, #13, #14
    • .
  • Update3 (31-Dec-2012)

    • Added for websockets communication (currently used to upload printer response to UI, should add support for bidirectional communication - will also maintain REST for API interface)
    • Added support in printer.js UI Library to map local callbacks with Event Messages for easy integration with UI components
    • Fixed issues #2, #3, #4, #5, #6, #7, #8, #11
    • .
  • Update2 (29-Nov-2012):

    • Ported and re-factored R2C2 webinterface (including client javascript helper file)
    • Added app.js code to deploy initial WebInterface for UI testing
    • Added rest.js module code to deploy REST API
    • Created mainapp.js to bind upper rest.js module requests with lower level modules (core.js serial communications module, slicer.js, downloader.js, etc)
    • .
  • Update1 (06-Nov-2012): Initial ./modules/core.js module is now working with writable stream interface, serialport communication support completed and also internal minimal cache/stream data parser engine in place.


- Completlety redesign the frontend UI and add extra functionalities
- Create documentation to explain core modules communication/workflow

Techincal Specs initial draft (work in progress)

REST API documentation (required for UI integration)

How to test 3DPI

It is now possible to test the WebInterface and send a simple GCODE command to printer. There is also an initial support to print data from .gcode files located at /bin/gcode/ .

// clone repo

$ git clone git://
$ cd 3DPrinterInterface

// update node required packages

$ npm update

// update configuration files (./config/*.json)

More info here: npm config package

# update rpi.json file and update the serialport property
nano ./config/rpi.json

// set node.js environment var to use ./config/rpi.json

// Note: when using default.json it is not required to export the variable, several config files can be set, only the exported will be used by node.js

export NODE_ENV=rpi

// launch demo WebInterface (will run on port 8080, REST API on 8081 and using the serialport defined in the exported config file)

$ node app.js

// Note: to test node app.js without a printer configure the serialport property with /dev/null to emulate printer serial port - printer response emulated by timer (default.js already configured with /dev/null)

3d Printers/electronic boards/microcontrollers tested hardware


Copyright (C) 2012 Nelson Neves

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see

You can’t perform that action at this time.