Sunday, June 5, 2016

NodeBots Day-1: Getting the Environment Ready - Ubuntu 16.04 LTS

Getting the robotic NodeBot environment ready on Ubuntu worked without a glitch.  To get the environment ready follow the same sequence described in the previous note:

  1. Install Node and NPM
  2. Install Johnny-Five
  3. Install Arduino software IDE
  4. Optionally install Visual Studio Code as a Code Editor
    1. Install Git previous to the installation of Visual Studio Code


I have an old Fujitsu laptop kicking around (i3, 2.26 GHz, Dual Core, with 4 GB of RAM) running Ubuntu 16.04 LTS.  Follow the instructions described in the following how to guide for installing Nodejs on Ubuntu.

We already know how to install Johnny-Five using NPM:

$ npm install johnny-five

To install the Arduino software IDE (Sketch) on ubuntu , the easiest way, is by issuing a command from terminal:

$ sudo apt-get update
$ sudo apt-get install arduino

The first command updates the list of packages and dependencies and the second command installs the arduino software.  You will need to provide the password of the super user.  Accepts the defaults and required dependencies are installed.  Once the installation process ends, search for Arduino and lock it on the launcher for convenience.

Start the sketch IDE and a permission dialog is loaded:



Click Add and provide the super user password again.  Connect the Arduino board to your computer through the provided USB cable and verify that the correct port is selected by going to Tools > Serial Port...  however, initially "Serial Port" was not enabled.  This was strange but after restarting the computer the Tools > Serial Port item was enabled and I selected the only port available to me '/dev/ttyACM0'.

Verify that the board under Tools > Boards is Arduino Uno

Now you can load the firmata from File > Examples > Firmata > StandardFirmata.  In the Windows environment we selected StandardFirmataPlus, but this one is not available in the version which was just installed.  Uploading the firmata to the board works perfect and there is no need to edit SerialFirmata.h header file.

Now you can test Blink.js.  Optionally install Visual Studio Code and GIT which I highly recommend, it provides intellisense, you can debug your scripts, you'll love it and it is free.

Write Blink or copy the Windows version but omit the configuration object passed into the Board constructor function.  There is no need to specify the port number for this exercise in this environment.

$ node Blink.js

Enjoy.

In our meetings we will try to cover as much as possible using the Johnny-Five gude.

References

4 comments:

  1. I would like to say that this blog really convinced me to do it! Thanks, very good post. I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article. Folder Lock For COMPUTER Kitkat - Don't Hang up Around Searching, Study Exactly About PC Desktops In this article free password protect folders

    ReplyDelete
  2. Aps And File Locker Apps PC Version Download - Don't Waste Time Looking, Study Information On PC Desktops In this article abbe

    ReplyDelete
  3. I'm impressed, I have to admit. Seldom do I encounter a blog that's both equally educative and entertaining, and let me tell you, you have hit the nail on the head. The issue is something not enough folks are speaking intelligently about. Now i'm very happy that I found this in my search for something regarding this. This hyperlink Learn How To Lock Files From The Movies

    ReplyDelete

A1 Repo: Simple Pagination for WCF Service Operation

It is never a good idea to paginate on the client.  This post is about a simple pagination for a WCF service operation.  For this work I nee...