Skip to main content

Planning

Ex 1: socket.io with Random data

  • What is socket.io?

Ex 2: API

  • What is an API?

Part A - Use request lib to get API data and display in terminal.
Part B - Same as above but sending API data to browser through socket.io
NOTE: Only problem with this is it could be done with AJAX easier

Ex 3: Serialport

  • What is serialport lib?

Part A - Push data out to terminal?
Part B - Push data through to browser.

MAYBE:

  • NodeRed
  • OSC
  • Group project

ARCHIVED

NodeJS + NPM

  • What / Why
  • Terminal usage

What is an API?

  • Best things ever. Over to you Adam.

Exercise 1: API Get / Node -> Terminal

  • require('request')
  • Explanation time: (cb + promises (async, bind, this))

Exercise 2: API GET / Node -> socket.io -> browser

Part A:

(Possibly use the wio link or WiFi Groove sensors)

  • socket.io -> No API -> Send time from browser
  • Simple authentication
  • Browser = not hosted by express

Exercise 3: Arduino -> Serials

Arduino -> Screen

  • 3 pots -> csv -> node -> browser

Screen -> Arduino

  • ??

Cloud API Service

  • Screen (js) -> DB as a service -> (node -> Arduino)

Tasks

  • P5 SerialPort/Server
  • Service / PubNub