กลับไปหน้ารวมไฟล์
getting-started-with-johnny-five-for-iot-part-1-398acd-en.md

Interested in the world of hardware hacking, but feeling left out because you just don’t have the time to learn another language? Or maybe you aren’t comfortable using Sketch to program? Have no fear, you can easily use JavaScript to program boards like Arduino and Genuino. Yes, just JavaScript!

In this series of video tutorials, Tomomi Imura from PubNub shows you how to start hacking an Arduino board with Node.js using Johnny-Five, a JavaScript Robotics Framework.

Part One covers:

  • Setting up a board.
  • Building the Hello World of hardware, a LED blink.
  • Writing your Johnny-Five code to make it blink according to the program.

Enjoy the tutorial!

EXPANDED TECHNICAL DETAILS

JavaScript Hardware Control

Johnny-Five is one of the most popular JavaScript Robotics & IoT frameworks. It allows developers to control Arduinos using Node.js instead of C++.

  • Firmata Protocol: The Arduino runs a standard piece of firmware called StandardFirmata. This turns the Arduino into an I/O expander for the host PC or Raspberry Pi.
  • Serial over USB: Node.js communicates with the board via the Serial port, sending high-level commands like led.blink() or servo.to(90).

IoT Integration

  • PubNub Connectivity: This project demonstrates "Part 1" by connecting the hardware to the PubNub API. This allows for real-time data streaming and remote control of the Arduino from any web browser in the world via a secure publish/subscribe messaging layer.

ข้อมูล Frontmatter ดั้งเดิม

title: "Getting Started with Johnny Five for IoT (Part 1)"
description: "Tomomi Imura, developer evangelist at PubNub, walks through setting up a Arduino simple circuit to blink a LED on-command using Johhny-Five."
author: "user434464008"
category: "Internet of Things, BT & Wireless"
tags:
  - "iot"
  - "internet of things"
views: 15751
likes: 7
price: 99
difficulty: "Easy"
components:
  - "1x Jumper wires (generic)"
  - "1x Breadboard (generic)"
  - "1x Arduino UNO"
  - "1x LED (generic)"
  - "1x Resistor 220 ohm"
tools: []
apps:
  - "1x Arduino IDE"
  - "1x PubNub Publish/Subscribe API"
  - "1x Johnny-Five"
downloadableFiles: []
documentationLinks: []
passwordHash: "acfb290ad18074f02d77bc4e0fd1cf4d7b66b7ef57120ce0348cae6f5aa8c3a1"
encryptedPayload: "U2FsdGVkX18U/mDm3lRyX9e5ELLdrGak8ILDjW6fg40OF98GeaH4DkiVt3T0bQpH875+hJjD6rGbfdKmY5D/aeNNM796Gy2rR8P9/SqIgI+SyVoCN7REFjg8ATnYTOV8RFarF+FGIBdbFzbWmuet9sWjTz1lMz4LU0toWzZYZDA="
seoDescription: "Learn how to get started with Johnny Five for IoT by setting up an Arduino circuit to control an LED with Tomomi Imura."
videoLinks:
  - "https://player.vimeo.com/video/170236455"
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/getting-started-with-johnny-five-for-iot-part-1-398acd_cover.jpg"
lang: "en"