Difference between revisions of "Fab modules/is"

From Fab Lab Wiki - by NMÍ Kvikan
Jump to: navigation, search
Line 16: Line 16:
 
Nú ætti Roland Modela fræsivélin að ná sambandi við tölvuna.
 
Nú ætti Roland Modela fræsivélin að ná sambandi við tölvuna.
  
== Guide for getting the fab-modules back-end installed and running ==
+
==Fab Modules leiðbeiningar==
The latest version (incarnation) of the fab-modules is running in the browser.<br />
+
Hugbúnaðurinn sem notaður er til þess að undirbúa teikninguna fyrir fræsun heitir Fab Modules. Ekki þarf að hala niður húgbúnaðinum heldur er hann aðgengilegur í gegnum vafra. Farið er inn á slóðina
The modules are located at: http://fabmodules.org
+
http://fabmodules.org
 +
Byrjið á að fræsa rásina sjálfa (traces). Notið 1/64 bita í það ferli.
  
 
If you click on the fab modules link in the top of the page you get to http://fabmodules.org/mods.html<br />
 
If you click on the fab modules link in the top of the page you get to http://fabmodules.org/mods.html<br />

Revision as of 11:08, 16 May 2017

Tengja tölvu og Roland Modela fræsivél

Fyrsta skref er að ná sambandi milli fræsivélar og tölvu. Opnið terminal í Linux stýrikerfinu. Byrjið á að skrifa "cd FabModules". Skipunin cd breytir hvar þú ert í skráarkerfi tölvunnar (change directory).

nmi@Lithium:~$ cd FabModules

Næsta skipun er ls. Sú skipun birtir lista af skrám inni í möppunni sem við vorum að opna (list).

nmi@Lithium:~/FabModules$ ls

Þar á meðal er skrá sem heitir mod_server. Opnið mod_server skránna og birtið svo lista af skrám inni í þeirri möppu.

nmi@Lithium:~/FabModules$ cd mod_server
nmi@Lithium:~/FabModules/mod_server$ ls

Nú sláið þið inn skipunina node mod_server.js

nmi@Lithium:~/FabModules/mod_server$ node mod_server.js

Nú ætti Roland Modela fræsivélin að ná sambandi við tölvuna.

Fab Modules leiðbeiningar

Hugbúnaðurinn sem notaður er til þess að undirbúa teikninguna fyrir fræsun heitir Fab Modules. Ekki þarf að hala niður húgbúnaðinum heldur er hann aðgengilegur í gegnum vafra. Farið er inn á slóðina http://fabmodules.org Byrjið á að fræsa rásina sjálfa (traces). Notið 1/64 bita í það ferli.

If you click on the fab modules link in the top of the page you get to http://fabmodules.org/mods.html
Near the bottom are links to the mod_server dependencies and mod_serial.y dependencies.

Bas has written a little install script for a slightly older version of the fab-modules:
File:fab-serve-script.zip

Preparations

(Create the folder that you will be running the node.js server from) (finding out if this is necessary)

Installing node.js

form https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager

  • make sure to run these commands line by line instead of copying and pasting the whole bunch at the same time.
sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install nodejs
sudo apt-get install -y build-essential

Test

Test: Run
node -v

output sould be the version number (v0.10.35)

Install NPM

form: https://docs.npmjs.com/getting-started/installing-node

NMP (Node Package Manager) comes pre-installed with Node.js, but make sure it is at the latest version by running:

sudo npm install -g npm

This should respond with

/usr/bin/npm -> /usr/lib/node_modules/npm/bin/npm-cli.js
npm@2.3.0 /usr/lib/node_modules/npm

Test

Test: Run
npm -v

output sould be the version number (2.2.0)

Installing WS

The mod_get installation script will install this package in the correct folder.

Installing Python

required to run py-serial out to the modela.

sudo apt-get install python python-tk python-serial

Installing the server-part

wget http://mod.cba.mit.edu/mod_get
chmod +x mod_get
./mod_get

This script will create the directory "mod.cba.mit.edu/" wherein it will install all current fab-module html files and the server component.

cd mod.cba.mit.edu
chmod +x mod_server/mod_server.js

Following this up to here on a clean install results in

./mod_serve: line 2: cd: /usr/local/bin/mod_server: No such file or directory

module.js:340
    throw err;
          ^
Error: Cannot find module '/home/fablab/mod.cba.mit.edu/mod_server.js'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:929:3


Troubleshooting

  • If you want to cancel project.
    • Put machine into View and then click cancel on computer
  • If that does not work
    • Go to terminal on Ubuntu
      • Write:
ps -aux
      • Find the process number of the fab modules
nmi       number_of_process  0.0  0.0   2272   556 pts/4    S+   17:18   0:00 /bin/sh -c mod_serial.py /dev
nmi       9514  0.5  0.5  37820 11212 pts/4    Sl+  17:18   0:00 python /usr/local/bin/mod_ser
      • Write in terminal
kill -9 number_of_process