-
Notifications
You must be signed in to change notification settings - Fork 5
Install
You must have:
To install firenodejs for the first time, open up a console window:
cd ~
git clone https://github.com/firepick1/firenodejs
cd firenodejs
scripts/install.sh
To expedite installation, make sure that you have hardwired ethernet for best speed. The install pulls in a lot of node modules.
To update an installed firenodejs, open up a console window:
cd ~/firenodejs
git pull
scripts/install.sh
Open up a console window in the firenodejs
directory
and let's launch firenodejs:
scripts/startup.sh
Open up a browser to see the firenodejs web page. Here we assume that you have installed on a Raspberry Pi:
The firenodejs server automatically maintains a model of the FireStep controller state that you can view quickly:
The firenodejs server provides access to your Raspberry Pi camera:
Congratulations! You're DONE.
Once you are comfortable launching firenodejs, you can explore additional use cases.
To see a list of available firenodejs command line options:
./node js/server.js --help
You can configure your computer to launch firenodejs automatically on startup.
The exact command will differ by Linux system, but on Raspberry Pi,
you can edit /etc/rc.local
as root to add a line like the following:
sudo -u pi /home/pi/dev/firenodejs/scripts/startup.sh
NOTE: The example above assumes that you installed firenodejs in /home/pi/dev/firenodejs. Amend the command as necessary for your machine.
Now, when you turn everything on, firenodejs will launch automatically.
FireStep and real machines don't execute commands instantly. The real world just is that way. If you don't need a real machine and just want to exercise firenodejs by itself, you can use a mock FireStep driver.
- mock-fpd Rotary delta (FPD) mock FireStep driver
scripts/startup.sh --mock-fpd
- mock-xyz XYZ cartesian mock FireStep driver
scripts/startup.sh --mock-xyz
The startup.sh script appends nodejs output to firenodejs.log
. If you want to see it on
the console, launch a background job to echo log output to your screen:
tail -F firenodejs.log&
The log is normally terse. If you want more detailed information try this:
scripts/startup.sh --verbose
Browser logging is also available via the Javascript console. Most web browsers have "Developer Tools" (or similar feature) that allow you to see the Javascript console.
- [Raspberry Pi instructions](Raspberry Pi)
- Why port 8080? The standard HTTP port 80 is below 1024 and normally off-limits to normal users. There are many solutions to this problem. The ugliest solution (because root should never run a web server) is to do this:
sudo ./node js/server.js
- How do I kill all firenodejs processes? The following script will terminate all firenodejs processes:
scripts/shutdown.sh
-
What about Apple Macintosh? Macs are based on Unix, so it should (?) be possible to run firenodejs on a Mac, although Karl uses a ChromeBook and can't really help there...
-
What about Microsoft Windows? nodejs does run on Microsoft Windows, and it should be feasible to eventually run firenodejs on Windows. However, given quality of life issues, that is low priority. Perhaps in Karl's next lifetime, Windows won't exist and this won't be an issue.