Giter Club home page Giter Club logo

arduino's Introduction

Arduino Fun

Actually, I'd say this project really combined all the learning I've done the last 2 days about programming the Arduino Uno board, the hardware and 'C'-like (actually really Java-like) language used to program it.

There are many "sketch" examples, including a built-in implementation of "Firmata" - a library/protocol for communicating with small microcontrollers via serial protocols. Running this on the Arduino allows me to use any language capable of using the serial port to query and set I/O lines on the Arduino board.

In this case I'm using "processing" (processing.org) a java-based language that shares almost exactly the same syntax with Arduino's programming language. Interestingly, I first ran across Processing in its form as Processing.js. It turns out Khan Academy chose this canvas graphics library for their computer science course (well John Resig), and so, as it seems all things are eventually connected in the technology world, I realized I already knew (mostly) how to code to Arduino because, guess what?, it's all Java in the end.

For communicating via Firmata protocol, node.js has modules for serial communication as well as a Firmata module. I'll shortly be using node.js as well.

Project Video

This video shows the outcome of this little experiment in the all-Processing Arduino solution. The various processing programs and snippet I've checked-in show examples of the graphic commands and communication commands needed. The final project used almost every one of these smaller examples. Seeing-Eye Arduino

Node.js Examples

  • Just added readdata.js which connects to a serial port and reads data sent by the Arduino.
  • Also added the simple Arduino 'sketch' that sends the data.
  • Added index.html which uses WebSocket and processing.js to retrieve and display data from node.js WebSocket server.

johnny-five

  • Added johnny5test.js which shows how to use johnny-five module to talk to Firmata enabled arduino.
  • This also demos the use of the 'ws' "npm install ws" websockets module to send the data read from A0 pin.
  • Also hosts a little web server on localhost:8080.
  • URL http://localhost:8080/index.html while running "node johnny5test.js"

Enjoy, Mike

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.