Brain Coral Tutorial: Setting up your environment

Version 4

    Let’s start by creating a project directory on the Galileo. If you’re not already logged into the Galileo as root, do so now using SSH or telnet, navigate to the root by executing: cd /


    Once here, create a folder called "projects" using the "make directory" command: mkdir projects.


    Go into this folder using the "change directory" command followed by the folder name: cd projects. This will be the root of the projects associated with this tutorial.


    Set the date on the Galileo

    We will be using the JavaScript package from the Node Package Manager (npm) named galileo-io. In order to install packages from npm, you may need to set the date on your Galileo. To do so, using the following format for setting a date, run the following code using today’s date and time:


    date -s "2014-07-1 12:00:00"


    NOTE: Ensure the date and time you use is accurate.

    Install the npm module, galileo-io

    We'll begin with the most important step, installing the JavaScript package, galileo-io. This will allow us to programmatically interface with Galileo using JavaScript. Make sure you're in the "projects" directory on your Galileo. You should already be connected through telnet or SSH. Next, execute the following code to install the galileo-io node module:


    npm install galileo-io


    This will create a folder called "node_modules" in your current directory that contains the libraries required for sending/receiving input/output data to/from the Galileo using JavaScript. This may take a minute or two to complete. After it installs, your terminal will return to its original view.

    < IntroductionHello Galileo >