This page describes how to install NTK for authoring projects. NTKÂ supports the following ways of working:
- App – This is a simple double-clickable app for your computer, just download it and run. Authoring takes place in the app, and can also be accessed in a web browser (note: due to some technical issues, v1.0 only includes an app for the Mac, the Windows app will follow).
- Go the Download page and getÂ the app for your system.
- Place it in your applications/programs folder
- Plug in your Arduino before opening NTK
- Run NTK
- Command Line – TheÂ command line version that requires some other software and simple commands to launch the NTK server from the command line.Â Authoring takes place in a web browser. See below for details on how to install the command line version.
- Developer Version – If you want to make changes to NTK includingÂ creating new widgets, you’ll need to install the full developer version of NTK. Instructions are here.
For most users, the AppÂ version of NTK is all you will need, and you canÂ skip all of the below.
1 Install Node and NPM (one time only)
- Mac or Windows, install Node and NPM from the official Node websiteÂ using their standard installer for version v4.2.2. Mac, Win 64, Win32, all others.
- Linux – You most likely have Node/NPM already installed. If you are on Raspberry Pi, then you mayÂ have an outdated version of Node. Here’s a nice & easy upgrade method:Â https://github.com/DonaldDerek/rPi-cheat-sheet
2 Download NTK
Go to the Download page on this site, and getÂ the current version of the HTML5 NTKserver.
Unzip this file and place the NTKserver folder on your hard drive in a convenient location. We recommend theseÂ locations:
- WindowsÂ -Â “C:/Program Files”
- Mac -Â /Applications
- Edison/Linux – /home/root/
Note: with a Linux embedded system like the Intel Edison, you’ll probably need to push the files over to the device through a network connection. Instead of FTP, we recommend using SCP. For example:
scp -r ./NTKserver email@example.com:/home/root/.
3 Run the installation process
Now that the NTKserver folder is in place, youÂ complete the installation by preparing NTK for your operating system. You do this in the command line interface (CLI) for your computer or device.
cd "C:/Program Files/NKTserver" npm install
cd /Applications/NTKserver npm install
cd /home/root/server npm install
The command line interface is different for each platform:
- Mac –Â Terminal app – located in /Applications/Utilities/Terminal.app
- WindowsÂ –Â cmdÂ app – Open the start menu, and type “cmd” in the search box. Hit enter to open the app.
- Edison/Linux – you know how to do this
Once you have the command line app open, you need to change the directory to NTKserver. The easiest way to do this is to type “cd ” withÂ a space after the cd. Then find NTKserver in your normal file system window and drag the folder into the command line app. This will place the complete directory path to NTKserver after the cd command.
After you change directory (cd) to NTKserver, you run the a special Node.js command called NPM to complete the installation. Remember to hit return after each command.
“npm install” will take a few minutes to complete and print out a lot of complex looking text. Wait until you see the command line prompt again before you move on to the next step.
MAC NOTE: If you are on a Mac, and there are errors during the npm install, you should try installing Xcode from the Mac App Store.
WINDOWSÂ NOTE: If the install does not work and shows errors related to serialport, try the method described here:
4 Run NTK
Each time you run NTK, you’ll need to use the command line interface (Terminal or cmd)Â to cd to the NTKserver directory and runÂ the start command.
cd "C:/Program Files/NKTserver" npm start
cd /Applications/NTKserver npm start
cd /home/root/NTKserver node cli.js edison