Skip to content

nneves/3DPrinterCloudClient

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

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

3DPrinterCloudClient

Node.js 3D Printer Cloud Client (early test)

Currently running this as a command line tool to print gcode to 3d printer via node.js.

Testing with node.js v0.10.5 running on a TP-Link WR703N with OpenWrt.

WR703N is higly limited, low CPU and RAM, so it is required to launch node.js with some parameters:

# adjust serialport and speed in ./config/linux.json
export NODE_ENV=linux
node --stack_size=1024 --max_old_space_size=20 --max_new_space_size=2048 --max_executable_size=5 --gc_global --gc_interval=100 app.js ./bin/gcode/smallwheel.gcode

To send direct commands to your printer use this:

# adjust serialport and speed in ./config/linux.json
export NODE_ENV=linux
node --stack_size=1024 --max_old_space_size=20 --max_new_space_size=2048 --max_executable_size=5 --gc_global --gc_interval=100 app.js

NOTES: Cross-Compile libv8.so, Node.js, and SerialPort NPM module: v8mips/v8mips#19 (comment)

NOTE2: No NPM available, just install the modules on a Linux/Mac machine (npm update) and copy 'node_modules' to the embedded system. SerialPort need to be Cross-Compiled (check the link instructions on NOTE)

Damn it, I just want to test this on my Laptop/PC

  • Install Node.js and NPM
  • clone this repo:
git clone https://github.com/nneves/3DPrinterCloudClient
  • cd 3DPrinterCloudClient
  • npm update
  • edit one of the configuration profiles:
nano ./config/linux.json

adjust your 3D Printer Serial Port and Speed (use /dev/null to emulate a printer response)

{
    "serialport": {
        "serialport": "/dev/ttyACM0", 
        "baudrate": 115200
    }        
}
  • export NODE_ENV variable with the config file name to use (without .json extension) - you can create as much profiles as required:
export NODE_ENV=linux
  • launch app:
$ node app.js ./bin/gcode/smallwheel.gcode
  • or launch 3d printer command line [WIP]:
$ node app.js

NOTE: This is still in an early h@ck1ng stage, a lot of work on the WR703N memory tunning... WIP!!!

About

Node.js 3D Printer Cloud Client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published