SlideShare ist ein Scribd-Unternehmen logo
1 von 87
Downloaden Sie, um offline zu lesen
Vom Widerstand zum Arduino
Mobile Tech Conference 2014
18.03.2014, Lars Gregori, msgGillardon AG
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Lars Gregori
 Kommunikationselektroniker (Funktechnik)
 Informatik Fachrichtung Wirtschaft (FH)
 Softwareentwickler (Java Enterprise)
 Arduino
2
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 3
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 4
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Widerstand
 Schaltbild
5
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Widerstand
 Schaltbild
 Ohmsches Gesetz
 R = U / I [Ohm]
 I = U / R [Ampere]
 U = R * I [Volt]
6
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Widerstand
 Schaltbild
 Ohmsches Gesetz
 R = U / I [Ohm]
 I = U / R [Ampere]
 U = R * I [Volt]
7
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Widerstand
 Schaltbild
 Ohmsches Gesetz
 R = U / I [Ohm]
 I = U / R [Ampere]
 U = R * I [Volt]
8
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Widerstand
 Schaltbild
 Ohmsches Gesetz
 R = U / I [Ohm]
 I = U / R [Ampere]
 U = R * I [Volt]
9
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Widerstand
 Schaltbild
 Ohmsches Gesetz
 R = U / I [Ohm]
 I = U / R [Ampere]
 U = R * I [Volt]
10
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Widerstand
 Schaltbild
 Ohmsches Gesetz
 R = U / I [Ohm]
 I = U / R [Ampere]
 U = R * I [Volt]
11
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 12
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
 Schaltbild
 light-emitting diode
LED
13
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 14
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Diode
 Schaltbild
15
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Diode
 Schaltbild
 Sinus von +5V bis -5V
16
ohne Diode
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
 Schaltbild
 Sinus von +5V bis -5V
Diode
17
mit Diode
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 18
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
LED
 Polung
Kathode (Minus)?
19
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
LED
 Polung
Kathode (Minus)
 flache Seite
20
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
LED
 Polung
Kathode (Minus)
 kurzes Bein
21
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
LED
 Polung
22
falsch
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
 Polung
LED
23
richtig
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
 Polung
LED
24
richtig
?
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
 Vorwiderstand
LED
25
?
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
 Datenblatt
LED
26
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
 Datenblatt
LED
27
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
 Vorwiderstand
LED
28
?
ILED = 18mA
ULED = 2,2V
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
 Vorwiderstand
LED
29
ILED = 18mA
ULED = 2,2V
IR = 18mA
UR =
R = ?
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
 Vorwiderstand
LED
30
ILED = 18mA
ULED = 2,2V
IR = 18mA
UR = 5V – 2,2V = 2,8V
R =
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
 Vorwiderstand
LED
31
ILED = 18mA
ULED = 2,2V
IR = 18mA
UR = 5V – 2,2V = 2,8V
R = U / I = 2,8V / 18mA = 155 Ohm
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
 Vorwiderstand
LED
32
ILED = 18mA
ULED = 2,2V
IR = 18mA
UR = 5V – 2,2V = 2,8V
R = U / I = 2,8V / 18mA = 155 Ohm
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 33
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
LED
 Ein-Schalten
34
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
LED
 Ein-Schalten
35
int led = 13;
void setup() {
pinMode(led, OUTPUT);
}
void loop() {
digitalWrite(led, HIGH);
}
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
LED
 Blinken
36
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
LED
 Blinken
37
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
LED
 Fade
 “analog”
 PWM
38
int led = 9;
int brightness = 0;
int fadeAmount = 5;
void setup() {
pinMode(led, OUTPUT);
}
void loop() {
analogWrite(led, brightness);
brightness = brightness + fadeAmount;
if (brightness == 0 || brightness == 255) {
fadeAmount = -fadeAmount;
}
delay(30);
}
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Pulse Width Modulation (PWM)
 http://arduino.cc/en/Tutorial/PWM
39
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 40
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Servo Motor
 #include <Servo.h>
 myservo.attach
 myservo.write
41
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 42
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Motor

 “Each pin can provide or receive a maximum of 40 mA”
 http://arduino.cc/en/Main/arduinoBoardUno
43
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 44
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Transistor
 Schaltbild
 Verstärker
45
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Transistor
46
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Transistor
47
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 48
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Motor
 Schutzdiode
49
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 50
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Relais
51
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 52
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Microcontroller ATmega328
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limits) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
Analog Input Pins 6
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA
Flash Memory
32 KB (ATmega328)
of which 0.5 KB used by bootloader
SRAM 2 KB (ATmega328)
EEPROM 1 KB (ATmega328)
Clock Speed 16 MHz
Arduino Uno : http://arduino.cc/en/Main/ArduinoBoardUno
53
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Schaltplan
54
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Schaltplan
55
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Language
 http://arduino.cc/en/Reference/HomePage
 Structure
 setup
 loop
 …
 Variables
 HIGH, LOW
 …
 Functions
 pinMode
 digitalWrite
 digitalRead
 …
56
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Standard Libraries
 EEPROM
 LiquidCrystal - for controlling liquid crystal displays (LCDs)
 Servo - for controlling servo motors
 …
57
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 58
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
LiquidCrystal.h
 http://www.arduino.cc/en/Tutorial/LiquidCrystal
59
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
lcd.begin(16, 2);
lcd.print("hello, world!");
}
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
LiquidCrystal.h
 http://www.arduino.cc/en/Tutorial/LiquidCrystal
60
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 61
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Nokia 5110 / 3310
 http://learn.adafruit.com/nokia-5110-3310-monochrome-lcd
62
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 63
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Sensoren
64
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Sensoren

65
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Sensoren DIY
 Capacitive Sensing Library
 http://playground.arduino.cc/Main/CapacitiveSensor?from=Main.CapSense
66
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 67
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Kommunikation Master-Slave-Bus
 Two Wire Interface (TWI) bzw. I²C
 2 Signalleitungen (SDA und SCL)
 Serial Peripheral Interface (SPI)
 4 Signalleitungen (SCK, MOSI, MOSO, SS)
68
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Firmata
 Standard Library
 for communicating with applications on the computer using
a standard serial protocol
 http://firmata.org/
 Computer ist der Host
 Jede Programmiersprache, die den Serial Port unterstützt.
 http://firmata.org/wiki/Download
69
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 70
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 71
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 72
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 73
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 74
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
ATTiny 85
 Atmel 8-bit AVR Microcontroller
 8 KBytes In-System Programmable Program Memory Flash
 512 Bytes In-System Programmable EEPROM
 512 Bytes Internal SRAM
 2.7V - 5.5V (ATtiny85), 1.8V - 5.5V (ATtiny85V)
75
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
ATTiny 85
 6 I/O Pins
 2 High Frequency PWM Outputs
 4 ADC (10-bit)
76
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 77
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 78
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Shields
 Standard Libaries
 SD
 Ethernet
 WiFi
 GSM
 TFT
 …
79
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 80
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
IOIO Board
 pronounced "yo-yo"
 https://github.com/ytai/ioio/wiki
 Host für Android und PC
 USB oder Bluetooth
 high-level Java API (Android Apps)
 Digital Input/Output, PWM, Analog Input, I2C, SPI und UART
81
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 82
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Raspberry PI
 http://www.raspberrypi.org/faqs
 700-MHz-ARM11-Prozessor
 256 oder 512 MB RAM
 Ethernet
 2 USB
 Linux
83
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
GPIO - General Purpose Input / Output
 17 GPIO Pins für Ein- oder Ausgabe
 3,3V (level shifter)
 SPI, I²C und UART
 Programmierung zum Beispiel mit Python
 … oder Bash
84
echo "4" > /sys/class/gpio/export
echo "in" > /sys/class/gpio/gpio4/direction
cat /sys/class/gpio/gpio4/value
0
echo "4" > /sys/class/gpio/unexport
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 85
Fragen
Wir bedanken uns für Ihre Aufmerksamkeit!
msgGillardon AG
Robert-Bürkle-Str. 1
85737 Ismaning
> www.msg-gillardon.de
© 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014
Credit
 Fonts
 Famirids http://www.dafont.com/famirids.font
 Petita http://www.dafont.com/petita.font
87

Weitere ähnliche Inhalte

Andere mochten auch

2013-06-13 ASIP Santé RIR "Etat d’avancement des travaux ROR (Répertoire Opér...
2013-06-13 ASIP Santé RIR "Etat d’avancement des travaux ROR (Répertoire Opér...2013-06-13 ASIP Santé RIR "Etat d’avancement des travaux ROR (Répertoire Opér...
2013-06-13 ASIP Santé RIR "Etat d’avancement des travaux ROR (Répertoire Opér...ASIP Santé
 
2013-05-28 ASIP Santé HIT "Actualité juridique de la e-santé"
2013-05-28 ASIP Santé HIT  "Actualité juridique de la e-santé"2013-05-28 ASIP Santé HIT  "Actualité juridique de la e-santé"
2013-05-28 ASIP Santé HIT "Actualité juridique de la e-santé"ASIP Santé
 
Snack S48-2015
Snack S48-2015Snack S48-2015
Snack S48-2015snackk4
 

Andere mochten auch (8)

2013-06-13 ASIP Santé RIR "Etat d’avancement des travaux ROR (Répertoire Opér...
2013-06-13 ASIP Santé RIR "Etat d’avancement des travaux ROR (Répertoire Opér...2013-06-13 ASIP Santé RIR "Etat d’avancement des travaux ROR (Répertoire Opér...
2013-06-13 ASIP Santé RIR "Etat d’avancement des travaux ROR (Répertoire Opér...
 
2013-05-28 ASIP Santé HIT "Actualité juridique de la e-santé"
2013-05-28 ASIP Santé HIT  "Actualité juridique de la e-santé"2013-05-28 ASIP Santé HIT  "Actualité juridique de la e-santé"
2013-05-28 ASIP Santé HIT "Actualité juridique de la e-santé"
 
Snack S48-2015
Snack S48-2015Snack S48-2015
Snack S48-2015
 
Presentation Ars
Presentation ArsPresentation Ars
Presentation Ars
 
Cv
CvCv
Cv
 
Voeux 2014
Voeux 2014 Voeux 2014
Voeux 2014
 
Verkehrskonzept Holweide
Verkehrskonzept HolweideVerkehrskonzept Holweide
Verkehrskonzept Holweide
 
NeueZieleairmarin_100408.pdf
NeueZieleairmarin_100408.pdfNeueZieleairmarin_100408.pdf
NeueZieleairmarin_100408.pdf
 

Mehr von Lars Gregori

BYOM - Bring Your Own Model
BYOM - Bring Your Own ModelBYOM - Bring Your Own Model
BYOM - Bring Your Own ModelLars Gregori
 
uTensor - embedded devices and machine learning models
uTensor - embedded devices and machine learning modelsuTensor - embedded devices and machine learning models
uTensor - embedded devices and machine learning modelsLars Gregori
 
SAP Leonardo Machine Learning
SAP Leonardo Machine LearningSAP Leonardo Machine Learning
SAP Leonardo Machine LearningLars Gregori
 
Minecraft and reinforcement learning
Minecraft and reinforcement learningMinecraft and reinforcement learning
Minecraft and reinforcement learningLars Gregori
 
Machine Learning Models on Mobile Devices
Machine Learning Models on Mobile DevicesMachine Learning Models on Mobile Devices
Machine Learning Models on Mobile DevicesLars Gregori
 
Minecraft and Reinforcement Learning
Minecraft and Reinforcement LearningMinecraft and Reinforcement Learning
Minecraft and Reinforcement LearningLars Gregori
 
IoT protocolls - smart washing machine
IoT protocolls - smart washing machineIoT protocolls - smart washing machine
IoT protocolls - smart washing machineLars Gregori
 
[DE] AI und Minecraft
[DE] AI und Minecraft[DE] AI und Minecraft
[DE] AI und MinecraftLars Gregori
 
Minecraft and Reinforcement Learning
Minecraft and Reinforcement LearningMinecraft and Reinforcement Learning
Minecraft and Reinforcement LearningLars Gregori
 
[DE] IoT Protokolle
[DE] IoT Protokolle[DE] IoT Protokolle
[DE] IoT ProtokolleLars Gregori
 
Using a trained model on your mobile device
Using a trained model on your mobile deviceUsing a trained model on your mobile device
Using a trained model on your mobile deviceLars Gregori
 
Using a trained model on your mobile device
Using a trained model on your mobile deviceUsing a trained model on your mobile device
Using a trained model on your mobile deviceLars Gregori
 
[German] Boards für das IoT-Prototyping
[German] Boards für das IoT-Prototyping[German] Boards für das IoT-Prototyping
[German] Boards für das IoT-PrototypingLars Gregori
 
IoT, APIs und Microservices - alles unter Node-RED
IoT, APIs und Microservices - alles unter Node-REDIoT, APIs und Microservices - alles unter Node-RED
IoT, APIs und Microservices - alles unter Node-REDLars Gregori
 
Web Bluetooth - Next Generation Bluetooth?
Web Bluetooth - Next Generation Bluetooth?   Web Bluetooth - Next Generation Bluetooth?
Web Bluetooth - Next Generation Bluetooth? Lars Gregori
 
Embedded Rust – Rust on IoT devices
Embedded Rust – Rust on IoT devicesEmbedded Rust – Rust on IoT devices
Embedded Rust – Rust on IoT devicesLars Gregori
 
Embedded Rust on IoT devices
Embedded Rust on IoT devicesEmbedded Rust on IoT devices
Embedded Rust on IoT devicesLars Gregori
 
IoT mit Rust programmieren
IoT mit Rust programmierenIoT mit Rust programmieren
IoT mit Rust programmierenLars Gregori
 
Boards for the IoT-Prototyping
Boards for the IoT-PrototypingBoards for the IoT-Prototyping
Boards for the IoT-PrototypingLars Gregori
 

Mehr von Lars Gregori (20)

BYOM - Bring Your Own Model
BYOM - Bring Your Own ModelBYOM - Bring Your Own Model
BYOM - Bring Your Own Model
 
uTensor - embedded devices and machine learning models
uTensor - embedded devices and machine learning modelsuTensor - embedded devices and machine learning models
uTensor - embedded devices and machine learning models
 
SAP Leonardo Machine Learning
SAP Leonardo Machine LearningSAP Leonardo Machine Learning
SAP Leonardo Machine Learning
 
Minecraft and reinforcement learning
Minecraft and reinforcement learningMinecraft and reinforcement learning
Minecraft and reinforcement learning
 
Machine Learning Models on Mobile Devices
Machine Learning Models on Mobile DevicesMachine Learning Models on Mobile Devices
Machine Learning Models on Mobile Devices
 
Minecraft and Reinforcement Learning
Minecraft and Reinforcement LearningMinecraft and Reinforcement Learning
Minecraft and Reinforcement Learning
 
IoT protocolls - smart washing machine
IoT protocolls - smart washing machineIoT protocolls - smart washing machine
IoT protocolls - smart washing machine
 
[DE] AI und Minecraft
[DE] AI und Minecraft[DE] AI und Minecraft
[DE] AI und Minecraft
 
Minecraft and Reinforcement Learning
Minecraft and Reinforcement LearningMinecraft and Reinforcement Learning
Minecraft and Reinforcement Learning
 
[DE] IoT Protokolle
[DE] IoT Protokolle[DE] IoT Protokolle
[DE] IoT Protokolle
 
Using a trained model on your mobile device
Using a trained model on your mobile deviceUsing a trained model on your mobile device
Using a trained model on your mobile device
 
Using a trained model on your mobile device
Using a trained model on your mobile deviceUsing a trained model on your mobile device
Using a trained model on your mobile device
 
AI and Minecraft
AI and MinecraftAI and Minecraft
AI and Minecraft
 
[German] Boards für das IoT-Prototyping
[German] Boards für das IoT-Prototyping[German] Boards für das IoT-Prototyping
[German] Boards für das IoT-Prototyping
 
IoT, APIs und Microservices - alles unter Node-RED
IoT, APIs und Microservices - alles unter Node-REDIoT, APIs und Microservices - alles unter Node-RED
IoT, APIs und Microservices - alles unter Node-RED
 
Web Bluetooth - Next Generation Bluetooth?
Web Bluetooth - Next Generation Bluetooth?   Web Bluetooth - Next Generation Bluetooth?
Web Bluetooth - Next Generation Bluetooth?
 
Embedded Rust – Rust on IoT devices
Embedded Rust – Rust on IoT devicesEmbedded Rust – Rust on IoT devices
Embedded Rust – Rust on IoT devices
 
Embedded Rust on IoT devices
Embedded Rust on IoT devicesEmbedded Rust on IoT devices
Embedded Rust on IoT devices
 
IoT mit Rust programmieren
IoT mit Rust programmierenIoT mit Rust programmieren
IoT mit Rust programmieren
 
Boards for the IoT-Prototyping
Boards for the IoT-PrototypingBoards for the IoT-Prototyping
Boards for the IoT-Prototyping
 

Vom Widerstand Zum Arduino

  • 1. Vom Widerstand zum Arduino Mobile Tech Conference 2014 18.03.2014, Lars Gregori, msgGillardon AG
  • 2. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Lars Gregori  Kommunikationselektroniker (Funktechnik)  Informatik Fachrichtung Wirtschaft (FH)  Softwareentwickler (Java Enterprise)  Arduino 2
  • 3. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 3
  • 4. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 4
  • 5. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Widerstand  Schaltbild 5
  • 6. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Widerstand  Schaltbild  Ohmsches Gesetz  R = U / I [Ohm]  I = U / R [Ampere]  U = R * I [Volt] 6
  • 7. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Widerstand  Schaltbild  Ohmsches Gesetz  R = U / I [Ohm]  I = U / R [Ampere]  U = R * I [Volt] 7
  • 8. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Widerstand  Schaltbild  Ohmsches Gesetz  R = U / I [Ohm]  I = U / R [Ampere]  U = R * I [Volt] 8
  • 9. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Widerstand  Schaltbild  Ohmsches Gesetz  R = U / I [Ohm]  I = U / R [Ampere]  U = R * I [Volt] 9
  • 10. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Widerstand  Schaltbild  Ohmsches Gesetz  R = U / I [Ohm]  I = U / R [Ampere]  U = R * I [Volt] 10
  • 11. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Widerstand  Schaltbild  Ohmsches Gesetz  R = U / I [Ohm]  I = U / R [Ampere]  U = R * I [Volt] 11
  • 12. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 12
  • 13. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014  Schaltbild  light-emitting diode LED 13
  • 14. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 14
  • 15. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Diode  Schaltbild 15
  • 16. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Diode  Schaltbild  Sinus von +5V bis -5V 16 ohne Diode
  • 17. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014  Schaltbild  Sinus von +5V bis -5V Diode 17 mit Diode
  • 18. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 18
  • 19. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 LED  Polung Kathode (Minus)? 19
  • 20. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 LED  Polung Kathode (Minus)  flache Seite 20
  • 21. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 LED  Polung Kathode (Minus)  kurzes Bein 21
  • 22. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 LED  Polung 22 falsch
  • 23. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014  Polung LED 23 richtig
  • 24. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014  Polung LED 24 richtig ?
  • 25. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014  Vorwiderstand LED 25 ?
  • 26. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014  Datenblatt LED 26
  • 27. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014  Datenblatt LED 27
  • 28. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014  Vorwiderstand LED 28 ? ILED = 18mA ULED = 2,2V
  • 29. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014  Vorwiderstand LED 29 ILED = 18mA ULED = 2,2V IR = 18mA UR = R = ?
  • 30. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014  Vorwiderstand LED 30 ILED = 18mA ULED = 2,2V IR = 18mA UR = 5V – 2,2V = 2,8V R =
  • 31. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014  Vorwiderstand LED 31 ILED = 18mA ULED = 2,2V IR = 18mA UR = 5V – 2,2V = 2,8V R = U / I = 2,8V / 18mA = 155 Ohm
  • 32. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014  Vorwiderstand LED 32 ILED = 18mA ULED = 2,2V IR = 18mA UR = 5V – 2,2V = 2,8V R = U / I = 2,8V / 18mA = 155 Ohm
  • 33. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 33
  • 34. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 LED  Ein-Schalten 34
  • 35. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 LED  Ein-Schalten 35 int led = 13; void setup() { pinMode(led, OUTPUT); } void loop() { digitalWrite(led, HIGH); }
  • 36. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 LED  Blinken 36
  • 37. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 LED  Blinken 37
  • 38. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 LED  Fade  “analog”  PWM 38 int led = 9; int brightness = 0; int fadeAmount = 5; void setup() { pinMode(led, OUTPUT); } void loop() { analogWrite(led, brightness); brightness = brightness + fadeAmount; if (brightness == 0 || brightness == 255) { fadeAmount = -fadeAmount; } delay(30); }
  • 39. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Pulse Width Modulation (PWM)  http://arduino.cc/en/Tutorial/PWM 39
  • 40. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 40
  • 41. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Servo Motor  #include <Servo.h>  myservo.attach  myservo.write 41
  • 42. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 42
  • 43. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Motor   “Each pin can provide or receive a maximum of 40 mA”  http://arduino.cc/en/Main/arduinoBoardUno 43
  • 44. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 44
  • 45. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Transistor  Schaltbild  Verstärker 45
  • 46. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Transistor 46
  • 47. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Transistor 47
  • 48. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 48
  • 49. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Motor  Schutzdiode 49
  • 50. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 50
  • 51. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Relais 51
  • 52. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 52
  • 53. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Microcontroller ATmega328 Operating Voltage 5V Input Voltage (recommended) 7-12V Input Voltage (limits) 6-20V Digital I/O Pins 14 (of which 6 provide PWM output) Analog Input Pins 6 DC Current per I/O Pin 40 mA DC Current for 3.3V Pin 50 mA Flash Memory 32 KB (ATmega328) of which 0.5 KB used by bootloader SRAM 2 KB (ATmega328) EEPROM 1 KB (ATmega328) Clock Speed 16 MHz Arduino Uno : http://arduino.cc/en/Main/ArduinoBoardUno 53
  • 54. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Schaltplan 54
  • 55. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Schaltplan 55
  • 56. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Language  http://arduino.cc/en/Reference/HomePage  Structure  setup  loop  …  Variables  HIGH, LOW  …  Functions  pinMode  digitalWrite  digitalRead  … 56
  • 57. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Standard Libraries  EEPROM  LiquidCrystal - for controlling liquid crystal displays (LCDs)  Servo - for controlling servo motors  … 57
  • 58. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 58
  • 59. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 LiquidCrystal.h  http://www.arduino.cc/en/Tutorial/LiquidCrystal 59 #include <LiquidCrystal.h> LiquidCrystal lcd(12, 11, 5, 4, 3, 2); void setup() { lcd.begin(16, 2); lcd.print("hello, world!"); }
  • 60. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 LiquidCrystal.h  http://www.arduino.cc/en/Tutorial/LiquidCrystal 60
  • 61. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 61
  • 62. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Nokia 5110 / 3310  http://learn.adafruit.com/nokia-5110-3310-monochrome-lcd 62
  • 63. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 63
  • 64. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Sensoren 64
  • 65. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Sensoren  65
  • 66. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Sensoren DIY  Capacitive Sensing Library  http://playground.arduino.cc/Main/CapacitiveSensor?from=Main.CapSense 66
  • 67. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 67
  • 68. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Kommunikation Master-Slave-Bus  Two Wire Interface (TWI) bzw. I²C  2 Signalleitungen (SDA und SCL)  Serial Peripheral Interface (SPI)  4 Signalleitungen (SCK, MOSI, MOSO, SS) 68
  • 69. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Firmata  Standard Library  for communicating with applications on the computer using a standard serial protocol  http://firmata.org/  Computer ist der Host  Jede Programmiersprache, die den Serial Port unterstützt.  http://firmata.org/wiki/Download 69
  • 70. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 70
  • 71. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 71
  • 72. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 72
  • 73. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 73
  • 74. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 74
  • 75. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 ATTiny 85  Atmel 8-bit AVR Microcontroller  8 KBytes In-System Programmable Program Memory Flash  512 Bytes In-System Programmable EEPROM  512 Bytes Internal SRAM  2.7V - 5.5V (ATtiny85), 1.8V - 5.5V (ATtiny85V) 75
  • 76. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 ATTiny 85  6 I/O Pins  2 High Frequency PWM Outputs  4 ADC (10-bit) 76
  • 77. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 77
  • 78. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 78
  • 79. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Shields  Standard Libaries  SD  Ethernet  WiFi  GSM  TFT  … 79
  • 80. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 80
  • 81. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 IOIO Board  pronounced "yo-yo"  https://github.com/ytai/ioio/wiki  Host für Android und PC  USB oder Bluetooth  high-level Java API (Android Apps)  Digital Input/Output, PWM, Analog Input, I2C, SPI und UART 81
  • 82. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 82
  • 83. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Raspberry PI  http://www.raspberrypi.org/faqs  700-MHz-ARM11-Prozessor  256 oder 512 MB RAM  Ethernet  2 USB  Linux 83
  • 84. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 GPIO - General Purpose Input / Output  17 GPIO Pins für Ein- oder Ausgabe  3,3V (level shifter)  SPI, I²C und UART  Programmierung zum Beispiel mit Python  … oder Bash 84 echo "4" > /sys/class/gpio/export echo "in" > /sys/class/gpio/gpio4/direction cat /sys/class/gpio/gpio4/value 0 echo "4" > /sys/class/gpio/unexport
  • 85. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 85 Fragen
  • 86. Wir bedanken uns für Ihre Aufmerksamkeit! msgGillardon AG Robert-Bürkle-Str. 1 85737 Ismaning > www.msg-gillardon.de
  • 87. © 2014 Lars Gregori, msgGillardon AG | Vom Widerstand zum Arduino | 18.03.2014 Credit  Fonts  Famirids http://www.dafont.com/famirids.font  Petita http://www.dafont.com/petita.font 87