Skip to main content

Understanding Arduino hardware

Ex

In 1:the socket.iokit, you will find an Arduino and two USB cables (USBC or USBA, pick the one that fits your computer).

arduinoHardware.png

1. Micro USB Port

Connect the Arduino with Randomyour datacomputer

    using
  • Whatthe USB cable, you will see the yellowish light turned on.

    2. RESET Button

    It is socket.io?

  • not
the

Exfactory 2:reset API

button
    than
  • Whatyou ismay find in other gadgets, but more like a restart button. If your Arduino freezes, lags or does anything weird, you can press the button.

    3. Arduino Model

    The white label indicates the model we are using. In the kit, you will find a LEONARDO, and we will need this piece of information later.

    4. Digital Input/ Output

    Digital means two states only, yes or no. Input can be something like a button, pressed / not pressed. Output can be something like an API?

  • LED
light, light on or light off.

5. Analog Input

PartAnalog Awill -give Useyou requestsomething libmore than yes or no. For example, analog input can be something like a temperature sensor, instead of just hot and cold, it will give you degress degree celsius, a range of values.

6. PWM pins

You can see the symbol ~ next to getsome APIdigital datapins, andthose displayare inPWM terminal.
pins. PartFor Bnow, -you Samecan see them as aboveanalog butoutput sendingpins. APIFor dataexample, if you want to browsercreate througha socket.io
breathing NOTE:light Only problemeffect with thisthe isLED itlight, couldyou will need to use one of those PWM pins.

7. Power Input/ Output

At the moment, we are using our computers as the power source via the micro USB port. When you finalise the setup, you won't need your computer with the setup, you can switch the power source to a power adapter, phone charger, batteries etc.

All other components that will be done with AJAX easier

Ex 3: Serialport

  • What is serialport lib?

Part A - Push data outadded to terminal?
the Partcircuit Bwill -need Pusha datapower throughsupply totoo, browser.

so

MAYBE:

we
    will
  • NodeRed
  • make
  • OSC
  • the
  • GroupArduino project
  • as
the
"second
ARCHIVED
battery"

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:

(Possiblyand use the wiopower linkoutput orpins WiFito Groovepower sensors)them all.

  • 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