To be able to make changes to NTK such as adding a new widget you create, you must install the current version of NTK from Github with the command line on your computer or device. This page describes how to do this complete installation.
If you simply want to use NTK to authorÂ projects, see the Install NTK page.
1 Install Node and NPM
One Time Only: You must first install node and npmÂ if you have not already done so.
- MacÂ orÂ Windows, install Node and NPM from the officialÂ Node.js websiteÂ using their standard installer (we’ve tested up to v4.2.2)
- 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
If you are on a Mac, you may need to install the Xcode command line tools by installing Xcode (free from the Mac app store).
2 Install dependencies
One Time Only: You need to install command-line tools: Ruby, bower, SASS, and the require.js build tool if you do not have them already. Again, copy each line, one at a time, from below and past it into your terminal and hit return.
npm install -g bower npm install -g requirejs sudo gem update --system sudo gem install sass
3 Install Current Version of NTK
Decide where on your storageÂ drive you want this installation of NTK to be, and “cd” to that directory. On the Mac we recommend /Applications . This process will create a new directory called “ntk” in that place. Copy each line and hit return, one at a time.
cd /Applications # or other location git clone https://github.com/netlabtoolkit/ntk.git cd ntk bower install npm install npm run build
Note: if you are running Linux, you will have to set proper permissions on your Arduino in order to use it. For instance:
# Linux users only sudo chmod a+rw /dev/ttyUSB0
4 Update to latest version
If you’ve already installed NTK, and want to update to the most current version, do the following
cdÂ /Applications/ntk # or wherever your installation is git pull npm run build