Git Product home page Git Product logo

johnnysocket's Introduction

JohnnySocket

Mashing Socket.io & JohnnyFive

Overview

This project demonstrates the ability to control an arduino unit with a webpage.

Web page ---> HTTP server / TCP Server ---> TCP Client / JohnnyFive Arduino controller ---> Arduino

Components

There are four components to this project:

  1. Arduino
  2. Node program running Johnny-Five & and a TCP client
  3. Node server serving static files via HTTP, running Socket.io, and a TCP server
  4. Static webpage which uses Socket.io to connect to the server.

Getting started

  1. Connect your arduino via USB & load the Firmata sketch. See Johnny-Five repo for instructions.
  2. Run node server.js on the remote host which will also serve the web page.
  3. Set the IP in arduino.js to the IP of your remote host: e.g. host:'66.172.10.186'
  4. Run node arduino.js locally on the computer which is connected to the arduino.
  5. You'll see the arduino's LED start to blink in response to the remote server. Eventually this will be controlled through a webpage.

Module dependencies

  • npm install socket.io
  • npm install node-static
  • npm install johnny-five

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.