IoT mit JavaScript



Navigation mit Esc, und
![johannes](images/johannes.png) ### [Johannes Hoppe](http://JohannesHoppe.de)
[![retro](images/busch_electronic.png)](http://www.busch-model.com/sf/experi.htm)
1. Diverse untereinander kompatible Platinen mit Microcontroller
("Board") 2. Name einer Entwicklungsumgebung (IDE)
(Programme nennt man "Sketch")
##  Arduino Uno 16MHz
  • 3x GND ("Ground") Pins (→ Masse)
  • Oben: Digitale Input und Output Pins
  • Unten rechts: Analoge Input Pins
  • Unten links: Versorgungs-Pins
##  Galileo Gen2 400 MHz
  • von Intel®
  • identische Pin-Anordnung wie bei Arduino Uno REV 3 ("Arduino 1.0 Pinout")
  • unterstützt Arduino Shields mit 3.3 V und 5 V (→ IOREF Jumper)
  • Zusätzlich u.a.: Mini-PCI Express, Ethernet 10/100 Mbps, Micro-SD, USB-Client, USB-Host...
```c contenteditable // Blinking LED - Arduino Sketch int led = 13; void setup() { pinMode(led, OUTPUT); } void loop() { digitalWrite(led, HIGH); delay(1000); digitalWrite(led, LOW); delay(1000); } ```
  • pinMode()      Configures the specified pin to behave either as an input or an output.
  • digitalRead()  Reads the value from a specified digital pin, either HIGH or LOW.
  • digitalWrite()  Write a HIGH (3.3/5 volts) or a LOW (0 volt, ground) value to a digital pin.
  • analogRead() Reads the value from the specified analog input pin.
  • analogWrite() Writes an 'analog' value (PWM wave) to a digital pin (marked with ~).
## PWM Pulse Width Modulation
## Breadboards [Widerstand](http://www.leds.de/Widerstandsrechner/) nicht vergessen! Breadboard - Steckboard/Experimentierboard

[Freie Hardware](http://www.oshwa.org/), wird nach [lizenzkostenfreien](http://www.ohwr.org/projects/cernohl/wiki) Bauplänen [hergestellt](http://www.instructables.com/tag/type-id/category-technology/channel-arduino/?sort=FEATURED)
   #### Open-Source Hardware Toolkit
#### Einfache und sichere
Elektronikaufbauten
  • Arduino-kompatibles Base Shield ("Stem")
  • Einzelne Module ("Twig")
  • alle Twigs haben ein vereinheitlichtes 4Pin Interface
Base Shield v2
![Logo Node.js](images/logo_node.js.svg)
V8, NPM, CommonJS
```js contenteditable // Blinking LED - Node.js var mraa = require('mraa'); myOnboardLed = new mraa.Gpio(13), ledState = true; myOnboardLed.dir(mraa.DIR_OUT); function loop() { myOnboardLed.write(ledState ? 1 : 0); ledState = !ledState; setTimeout(loop, 1000); } loop(); ```
## Downloads ![tools](images/icon_file.png) #### [github.com/JohannesHoppe](https://github.com/JohannesHoppe/Workshop_Javascript_Internet-of-Things/)
# Danke!
*  [johanneshoppe.de](http://johanneshoppe.de) *  [@JohannesHoppe](https://twitter.com/JohannesHoppe) *  [Johannes.Hoppe](https://www.facebook.com/johannes.hoppe)

Created by Johannes Hoppe | Print PDF