2. What are NodeBots
Imagine a world where you can write JavaScript to Hardware, talk to devices. That world is here
and now with node serialport/johnny-five and others.
If you have any JavaScript experience, you can now use your powers to manipulate the machines.
From blinking lights to Sumo Bot battles, Remote control cats, and Bull fighting with
quadcopters... (Taken from Nodebots Website http://nodebots.io/)
Nodebots are Robotics made accessible to Javascript Developers
3. Getting started : What you need to know
Javascript Ofcourse!
Node
Some basic understanding of electronics (Breadboard,Resistors,LEDs etc)
You can learn it in the process of building one nodebot no problem!
Hardware:
Arduino (Microcontroller is embedded in the board)
Breadboard, Jumper Wires
LED/LCD/Motors other peripheral componenets whichever you are trying to start with
4. What is an Arduino?
Arduino is an open-source electronics platform based on easy-to-use
hardware and software. It's intended for anyone making interactive
projects.
Arduino boards are able to read inputs - light on a sensor, a finger on
a button, or a Twitter message - and turn it into an output -
activating a motor, turning on an LED, publishing something online.
A microcontroller is a tiny and very simple computer. It has a simple
physical programmable circuit board that can detect various inputs
and send outputs
You can tell your board what to do by sending a set of instructions to
the microcontroller on the board.
Firmata is a protocol (set of rules) for communicating with
microcontrollers from software on a computer, smartphone, or tablet.
Standard Firmata is a software library that allows Arduino devices to
communicate with your computer using the Firmata protocol.
5. Johnny Five
Serialport npm developed by Chris Williams
JavaScript Robotics and IoT programming framework, developed at
Bocoup. http://johnny-five.io
Rick Waldron, the creator of the Johnny-Five platform and lead author of Make:
JavaScript Robotics, is at the forefront of this movement.
Johnny-Five has grown from a passion project into a tool for inspiring learning and
creativity for people of all ages, backgrounds, and from all across the world.
Other JS Robotics Frameworks:
cylon
Serialport
duino
6. Steps to run a sample program
Download Aruduino Software
Connect you Arduino to your PC and load the Firmata via the Arduino Software
Download Node
Npm install johhny-five
Run your node program
10. Example : LED Blink
Hardware Javascript Code
var five = require("johnny-five");
var board = new five.Board();
board.on("ready", function() {
// Create an Led on pin 13
var led = new five.Led(13);
// Blink every half second
led.blink(500);
});
Imagine a world where you can write JavaScript to control blenders, lights, security systems, or even robots. Yes, I said robots. That world is here and now with node serialport. It provides a very simple interface to the low level serial port code necessary to program Arduino chipsets, X10 wireless communications, or even the rising Z-Wave and Zigbeestandards. The physical world is your oyster with this goodie. For a full break down of why we made this, please read NodeBots - The Rise of JS Robotics.
Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js' package ecosystem, npm, is the largest ecosystem of open source libraries in the world.
A microcontroller is a tiny and very simple computer. It has a simple physical programmable circuit board that can detect various inputs and send outputs. An Arduino is a type of microcontroller. It is actually one of the most common ones for newcomers to experiment with.
Difference between microprocessor and microcontroller
Microprocessor is an IC which has only the CPU inside them i.e. only the processing powers such as Intel’s Pentium 1,2,3,4, core 2 duo, i3, i5 etc. These microprocessors don’t have RAM, ROM, and other peripheral on the chip. A system designer has to add them externally to make them functional. Application of microprocessor includes Desktop PC’s, Laptops, notepads etc.
But this is not the case with Microcontrollers. Microcontroller has a CPU, in addition with a fixed amount of RAM, ROM and other peripherals all embedded on a single chip. At times it is also termed as a mini computer or a computer on a single chip. Today different manufacturers produce microcontrollers with a wide range of features available in different versions. Some manufacturers are ATMEL, Microchip, TI, Freescale, Philips, Motorola etc.
Microcontrollers are designed to perform specific tasks. Specific means applications where the relationship of input and output is defined. Depending on the input, some processing needs to be done and output is delivered. For example, keyboards, mouse, washing machine, digicam, pendrive, remote, microwave, cars, bikes, telephone, mobiles, watches, etc. Since the applications are very specific, they need small resources like RAM, ROM, I/O ports etc and hence can be embedded on a single chip. This in turn reduces the size and the cost.
Microprocessor find applications where tasks are unspecific like developing software, games, websites, photo editing, creating documents etc. In such cases the relationship between input and output is not defined. They need high amount of resources like RAM, ROM, I/O ports etc.
The clock speed of the Microprocessor is quite high as compared to the microcontroller. Whereas the microcontrollers operate from a few MHz to 30 to 50 MHz, today’s microprocessor operate above 1GHz as they perform complex tasks. Read more about what is microcontroller.
Comparing microcontroller and microprocessor in terms of cost is not justified. Undoubtedly a microcontroller is far cheaper than a microprocessor. However microcontroller cannot be used in place of microprocessor and using a microprocessor is not advised in place of a microcontroller as it makes the application quite costly. Microprocessor cannot be used stand alone. They need other peripherals like RAM, ROM, buffer, I/O ports etc and hence a system designed around a microprocessor is quite costly.
Arduino vs Raspberyy Pi
An Arduino is a microcontroller motherboard. A microcontroller is a simple computer that can run one program at a time, over and over again. It is very easy to use.
A Raspberry Pi is a general-purpose computer, usually with a Linux operating system, and the ability to run multiple programs. It is more complicated to use than an Arduino.
a serial port is a serial communication interface through which information transfers in or out one bit at a time (in contrast to a parallel port).[1] Throughout most of the history of personal computers, data was transferred through serial ports to devices such as modems, terminals and various peripherals.