SlideShare a Scribd company logo
1 of 28
Download to read offline
IOT	
  101	
  
CompCon	
  2016	
  Workshop	
  
Anna	
  Gerber	
  
Solderless	
  Breadboard	
  
•  Use	
  to	
  prototype	
  circuits	
  
•  Numbered	
  rows	
  are	
  connected	
  
•  Some	
  have	
  power	
  rails	
  along	
  the	
  sides	
  
LEDs	
  
•  Light	
  EmiIng	
  Diode	
  
•  Polarized:	
  diodes	
  act	
  like	
  one	
  way	
  valves	
  so	
  
must	
  be	
  connected	
  in	
  a	
  certain	
  direcMon	
  
•  Emits	
  light	
  when	
  a	
  current	
  passes	
  through	
  
Anode	
  (+)	
  	
  
longer	
  lead	
  
connects	
  to	
  power	
  
Cathode	
  (-­‐)	
  	
  
connects	
  to	
  ground	
  
Resistors	
  
•  Introduces	
  resistance,	
  so	
  restricts	
  the	
  amount	
  
of	
  current	
  that	
  can	
  flow	
  through	
  a	
  circuit	
  
•  Can	
  be	
  connected	
  in	
  either	
  direcMon	
  
•  Bend	
  and	
  trim	
  the	
  leads	
  to	
  approx	
  1cm	
  each	
  
make	
  it	
  easier	
  to	
  use	
  with	
  the	
  breadboard	
  
Resistors	
  
•  330	
  ohm	
  resistor	
  
(orange,	
  orange,	
  brown,	
  
gold)	
  –	
  use	
  with	
  LEDs	
  
•  10K	
  resistor	
  (black,	
  
brown,	
  orange,	
  gold)	
  –	
  
use	
  with	
  LDR	
  
NodeMCU	
  v	
  1.0	
  
Connect	
  an	
  LED	
  
•  Connect	
  LED	
  to	
  pin	
  
D1	
  (GPIO	
  16)	
  
•  Connect	
  330	
  ohm	
  
resistor	
  to	
  GND	
  
•  Long	
  pin	
  (+)	
  of	
  LED	
  
goes	
  to	
  pin	
  D1	
  
Loading	
  programs	
  onto	
  the	
  board	
  
	
  Use	
  Arduino	
  
Integrated	
  
Development	
  
Environment	
  (IDE)	
  
to	
  write	
  and	
  send	
  
programs	
  to	
  run	
  on	
  
the	
  micro-­‐
controller	
  
Blink	
  
#define	
  LEDPIN	
  16	
  
void	
  setup()	
  {	
  
	
  	
  pinMode(LEDPIN,	
  OUTPUT);	
  
}	
  
void	
  loop()	
  {	
  
	
  	
  digitalWrite(LEDPIN,	
  HIGH);	
  	
  	
  	
  
	
  	
  delay(1000);	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  	
  digitalWrite(LEDPIN,	
  LOW);	
  	
  	
  	
  	
  
	
  	
  delay(1000);	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
}	
  
Add	
  ESP8266	
  to	
  Arduino	
  
•  Open	
  Arduino	
  IDE	
  
•  Open	
  Preferences	
  
•  Add	
  ESP8266	
  to	
  Boards	
  Manager	
  URL	
  
– hcp://arduino.esp8266.com/stable/
package_esp8266com_index.json	
  
•  Open	
  Tools	
  >	
  Board	
  >	
  Board	
  Manager	
  
– Search	
  for	
  ESP8266	
  and	
  install	
  
Uploading	
  the	
  code	
  
•  Select	
  the	
  board	
  
– Tools	
  >	
  Board	
  >	
  Node	
  MCU	
  1.0	
  
•  Select	
  the	
  port	
  
– Tools	
  >	
  Port	
  >	
  (the	
  port	
  for	
  your	
  board)	
  
•  Click	
  on	
  the	
  Upload	
  bucon	
  (arrow	
  poinMng	
  
right)	
  
•  Messages	
  are	
  displayed	
  at	
  the	
  bocom	
  of	
  the	
  
Arduino	
  window	
  
Neopixels	
  
•  WS2812B	
  light	
  source	
  
– Chainable,	
  individually	
  addressable	
  RGB	
  LEDs	
  
– Many	
  formfactors	
  (pixel,	
  ring,	
  bar,	
  strip	
  etc)	
  
– Each	
  unit	
  is	
  connected	
  via	
  3.3V,	
  GND	
  and	
  data	
  pin	
  
– Use	
  external	
  power	
  if	
  working	
  with	
  more	
  than	
  a	
  
few	
  LEDs 	
  	
  
•  See	
  
hcps://learn.adafruit.com/adafruit-­‐neopixel-­‐
uberguide/overview	
  
Install	
  the	
  Neopixel	
  library	
  
•  Install	
  Library	
  using	
  Library	
  Manager:	
  
– Sketch	
  >	
  	
  Include	
  Library	
  >	
  Manage	
  Libraries	
  
– Search	
  for	
  Neopixel	
  
•  OR	
  Download	
  library	
  files	
  from:	
  
– hcps://github.com/adafruit/Adafruit_NeoPixel	
  	
  
•  Copy	
  files	
  into	
  your	
  Arduino	
  Libraries	
  folder	
  
•  Restart	
  Arduino	
  IDE	
  
Connect	
  the	
  Neopixel	
  strip	
  
Always	
  disconnect	
  power	
  before	
  acaching	
  strip	
  
Connect	
  ground	
  first	
  
Programming	
  Neopixels	
  
Open	
  File	
  >	
  Examples	
  >	
  AdaFruit_Neopixel	
  >	
  simple	
  
Include	
  the	
  library	
  and	
  set	
  up	
  the	
  strip:	
  
#include	
  <Adafruit_NeoPixel.h>	
  
Adafruit_NeoPixel	
  strip	
  =	
  Adafruit_NeoPixel(8,	
  4,	
  NEO_GRB	
  +	
  
NEO_KHZ800);	
  
Number	
  of	
  LEDs	
  in	
  strip	
  is	
  8	
  
Pin	
  that	
  strip	
  is	
  connected	
  to	
  is	
  4	
  (D2)	
  
The	
  last	
  input	
  parameter	
  controls	
  color	
  order	
  &	
  frequency	
  for	
  strip	
  
Programming	
  Neopixels	
  
void	
  setup()	
  {	
  
	
  	
  strip.begin();	
  
	
  	
  strip.show();	
  //	
  all	
  pixels	
  off	
  to	
  start	
  
}	
  
Set	
  a	
  pixel	
  with	
  setPixelColor(pin,	
  color)	
  
Follow	
  with	
  strip.show()	
  to	
  make	
  it	
  live	
  
e.g.	
  set	
  the	
  first	
  neopixel	
  in	
  the	
  strip	
  (pixel	
  0)	
  to	
  red:	
  
//	
  Color	
  takes	
  R,	
  G,	
  B	
  values	
  (0	
  –	
  255)	
  
strip.setPixelColor(0,	
  strip.Color(255,	
  0,	
  0));	
  
strip.show();	
  
Neopixel	
  example	
  program	
  
#include	
  <Adafruit_NeoPixel.h>	
  
#define	
  PIN	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  4	
  
#define	
  NUMPIXELS	
  	
  	
  	
  	
  	
  8	
  
Adafruit_NeoPixel	
  pixels	
  =	
  Adafruit_NeoPixel(NUMPIXELS,	
  PIN,	
  NEO_GRB	
  +	
  NEO_KHZ800);	
  
void	
  setup()	
  {	
  
	
  	
  pixels.begin();	
  
}	
  
void	
  loop()	
  {	
  
	
  	
  for(int	
  i=0;i<NUMPIXELS;i++){	
  
	
  	
  	
  	
  pixels.setPixelColor(i,	
  pixels.Color(0,150,0));	
  	
  
	
  	
  	
  	
  pixels.show();	
  	
  
	
  	
  	
  	
  delay(500);	
  	
  
	
  	
  }	
  
}	
  
Custom	
  funcMons	
  
•  Every	
  Arduino	
  program	
  has	
  setup	
  and	
  loop	
  funcMons	
  but	
  you	
  
can	
  add	
  extra	
  funcMons	
  to	
  split	
  code	
  into	
  reusable,	
  
manageable	
  chunks	
  
•  FuncMons	
  can	
  return	
  a	
  result	
  e.g.	
  boolean	
  (true/false)	
  or	
  void	
  
if	
  they	
  don't	
  
boolean	
  checkValue(int	
  value)	
  {	
  
	
  	
  if	
  (value	
  >	
  threshold)	
  {	
  
	
  	
  	
  	
  digitalWrite(LEDPIN,	
  HIGH);	
  
	
  	
  	
  	
  return	
  true;	
  
	
  	
  }	
  else	
  {	
  
	
  	
  	
  digitalWrite(LEDPIN,	
  LOW);	
  
	
  	
  	
  return	
  false;	
  
	
  	
  }	
  
}	
  
Custom	
  Neopixel	
  funcMons	
  
Create	
  custom	
  funcMons	
  for	
  different	
  pacerns	
  and	
  behaviour	
  e.g:	
  
Call	
  randomCycle(20);	
  to	
  use	
  funcMon	
  with	
  20	
  millisecond	
  delay	
  
void	
  randomCycle(int	
  wait)	
  {	
  
	
  	
  	
  	
  for(int	
  i	
  =	
  0;	
  i	
  <	
  strip.numPixels();	
  i++)	
  {	
  
	
  	
  	
  	
  	
  	
  strip.setPixelColor(i,	
  strip.Color(	
  
	
  	
  	
  	
  	
  	
  	
  	
  random(256),	
  random(256),	
  random(256)	
  
	
  	
  	
  	
  	
  	
  ));	
  
	
  	
  	
  	
  }	
  
	
  	
  	
  	
  strip.show();	
  
	
  	
  	
  	
  delay(wait);	
  
}	
  
See	
  File	
  >	
  Examples	
  >	
  AdaFruit_Neopixel	
  >	
  strandtest	
  for	
  examples	
  
Photo	
  Resistor	
  
•  Non-­‐polarized	
  
•  Connect	
  one	
  lead	
  to	
  ground	
  
•  Connect	
  the	
  other	
  lead	
  to	
  an	
  Analog	
  pin	
  
and	
  also	
  a	
  10K	
  pull-­‐up	
  resistor	
  to	
  3.3V	
  
•  Also	
  known	
  as	
  LDR	
  (light	
  dependent	
  
resistor)	
  or	
  photocell	
  
Read	
  from	
  photo	
  resistor	
  
const	
  int	
  analogInPin	
  =	
  A0;	
  	
  	
  
int	
  sensorValue	
  =	
  0;	
  
void	
  setup()	
  {	
  
	
  Serial.begin(115200);	
  
}	
  
void	
  loop()	
  {	
  
	
  sensorValue	
  =	
  analogRead(analogInPin);	
  
	
  Serial.print("sensor	
  =	
  ");	
  
	
  	
  Serial.prinlnt(sensorValue);	
  
	
  delay(500);	
  
}	
  
Open	
  Tools	
  >	
  Serial	
  Monitor	
  
Iot 101

More Related Content

What's hot

Getting Started With Raspberry Pi - UCSD 2013
Getting Started With Raspberry Pi - UCSD 2013Getting Started With Raspberry Pi - UCSD 2013
Getting Started With Raspberry Pi - UCSD 2013
Tom Paulus
 

What's hot (20)

The IoT Academy IoT Training Arduino Part 3 programming
The IoT Academy IoT Training Arduino Part 3 programmingThe IoT Academy IoT Training Arduino Part 3 programming
The IoT Academy IoT Training Arduino Part 3 programming
 
Making things sense-Day 2 (May 2011)
Making things sense-Day 2 (May 2011)Making things sense-Day 2 (May 2011)
Making things sense-Day 2 (May 2011)
 
Making things sense - Day 1 (May 2011)
Making things sense - Day 1 (May 2011)Making things sense - Day 1 (May 2011)
Making things sense - Day 1 (May 2011)
 
Lab2ppt
Lab2pptLab2ppt
Lab2ppt
 
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
 
Intro to Arduino
Intro to ArduinoIntro to Arduino
Intro to Arduino
 
Arduino Programming
Arduino ProgrammingArduino Programming
Arduino Programming
 
Physical prototyping lab1-input_output (2)
Physical prototyping lab1-input_output (2)Physical prototyping lab1-input_output (2)
Physical prototyping lab1-input_output (2)
 
Presentation
PresentationPresentation
Presentation
 
Starting with Arduino
Starting with Arduino Starting with Arduino
Starting with Arduino
 
Arduino Workshop
Arduino WorkshopArduino Workshop
Arduino Workshop
 
Physical prototyping lab3-serious_serial
Physical prototyping lab3-serious_serialPhysical prototyping lab3-serious_serial
Physical prototyping lab3-serious_serial
 
Multilayer Neuronal network hardware implementation
Multilayer Neuronal network hardware implementation Multilayer Neuronal network hardware implementation
Multilayer Neuronal network hardware implementation
 
Programming with arduino
Programming with arduinoProgramming with arduino
Programming with arduino
 
Introduction to Arduino Microcontroller
Introduction to Arduino MicrocontrollerIntroduction to Arduino Microcontroller
Introduction to Arduino Microcontroller
 
Astrobot session 3
Astrobot session 3Astrobot session 3
Astrobot session 3
 
arduino
arduinoarduino
arduino
 
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalPhysical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digital
 
publish manual
publish manualpublish manual
publish manual
 
Getting Started With Raspberry Pi - UCSD 2013
Getting Started With Raspberry Pi - UCSD 2013Getting Started With Raspberry Pi - UCSD 2013
Getting Started With Raspberry Pi - UCSD 2013
 

Viewers also liked

Viewers also liked (6)

"Serverless" express
"Serverless" express"Serverless" express
"Serverless" express
 
JavaScript Robotics
JavaScript RoboticsJavaScript Robotics
JavaScript Robotics
 
International NodeBots Day Brisbane roundup (BrisJS)
International NodeBots Day Brisbane roundup (BrisJS)International NodeBots Day Brisbane roundup (BrisJS)
International NodeBots Day Brisbane roundup (BrisJS)
 
Adding Electronics to 3D Printed Action Heroes
Adding Electronics to 3D Printed Action HeroesAdding Electronics to 3D Printed Action Heroes
Adding Electronics to 3D Printed Action Heroes
 
Integrating AngularJS with Drupal 7
Integrating AngularJS with Drupal 7Integrating AngularJS with Drupal 7
Integrating AngularJS with Drupal 7
 
Intro to Electronics in Python
Intro to Electronics in PythonIntro to Electronics in Python
Intro to Electronics in Python
 

Similar to Iot 101

Arduino Workshop (3).pptx
Arduino Workshop (3).pptxArduino Workshop (3).pptx
Arduino Workshop (3).pptx
HebaEng
 
Introduction to the Arduino
Introduction to the ArduinoIntroduction to the Arduino
Introduction to the Arduino
Wingston
 
Fundamentals of programming Arduino-Wk2.ppt
Fundamentals of programming Arduino-Wk2.pptFundamentals of programming Arduino-Wk2.ppt
Fundamentals of programming Arduino-Wk2.ppt
ansariparveen06
 
20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris
imec.archive
 

Similar to Iot 101 (20)

Iot bootcamp abridged - part 2
Iot bootcamp   abridged - part 2Iot bootcamp   abridged - part 2
Iot bootcamp abridged - part 2
 
arduinoworkshop-160204051621.pdf
arduinoworkshop-160204051621.pdfarduinoworkshop-160204051621.pdf
arduinoworkshop-160204051621.pdf
 
Ardui no
Ardui no Ardui no
Ardui no
 
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalPhysical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digital
 
Arduino Workshop (3).pptx
Arduino Workshop (3).pptxArduino Workshop (3).pptx
Arduino Workshop (3).pptx
 
Bidirect visitor counter
Bidirect visitor counterBidirect visitor counter
Bidirect visitor counter
 
Arduino Programming Basic
Arduino Programming BasicArduino Programming Basic
Arduino Programming Basic
 
Introduction to the Arduino
Introduction to the ArduinoIntroduction to the Arduino
Introduction to the Arduino
 
Using ARM Dev.Board in physical experimental instruments
Using ARM Dev.Board in physical experimental instrumentsUsing ARM Dev.Board in physical experimental instruments
Using ARM Dev.Board in physical experimental instruments
 
ARDUINO AND ITS PIN CONFIGURATION
 ARDUINO AND ITS PIN  CONFIGURATION ARDUINO AND ITS PIN  CONFIGURATION
ARDUINO AND ITS PIN CONFIGURATION
 
Rig nitc [autosaved] (copy)
Rig nitc [autosaved] (copy)Rig nitc [autosaved] (copy)
Rig nitc [autosaved] (copy)
 
Arduino by yogesh t s'
Arduino by yogesh t s'Arduino by yogesh t s'
Arduino by yogesh t s'
 
Fundamentals of programming Arduino-Wk2.ppt
Fundamentals of programming Arduino-Wk2.pptFundamentals of programming Arduino-Wk2.ppt
Fundamentals of programming Arduino-Wk2.ppt
 
Arduino wk2
Arduino wk2Arduino wk2
Arduino wk2
 
Arduino Foundations
Arduino FoundationsArduino Foundations
Arduino Foundations
 
Arduino.pptx
Arduino.pptxArduino.pptx
Arduino.pptx
 
Getting started with arduino workshop
Getting started with arduino workshopGetting started with arduino workshop
Getting started with arduino workshop
 
Rdl esp32 development board trainer kit
Rdl esp32 development board trainer kitRdl esp32 development board trainer kit
Rdl esp32 development board trainer kit
 
20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris
 
selected input/output - sensors and actuators
selected input/output - sensors and actuatorsselected input/output - sensors and actuators
selected input/output - sensors and actuators
 

More from Anna Gerber

Data Visualisation Workshop (GovHack Brisbane 2014)
Data Visualisation Workshop (GovHack Brisbane 2014)Data Visualisation Workshop (GovHack Brisbane 2014)
Data Visualisation Workshop (GovHack Brisbane 2014)
Anna Gerber
 

More from Anna Gerber (16)

Internet of Things (IoT) Intro
Internet of Things (IoT) IntroInternet of Things (IoT) Intro
Internet of Things (IoT) Intro
 
How the Web works
How the Web worksHow the Web works
How the Web works
 
Do you want to build a robot
Do you want to build a robotDo you want to build a robot
Do you want to build a robot
 
3D Printing Action Heroes
3D Printing Action Heroes3D Printing Action Heroes
3D Printing Action Heroes
 
3D Sculpting Action Heroes
3D Sculpting Action Heroes3D Sculpting Action Heroes
3D Sculpting Action Heroes
 
Data Visualisation Workshop (GovHack Brisbane 2014)
Data Visualisation Workshop (GovHack Brisbane 2014)Data Visualisation Workshop (GovHack Brisbane 2014)
Data Visualisation Workshop (GovHack Brisbane 2014)
 
Supporting Open Scholarly Annotation
Supporting Open Scholarly AnnotationSupporting Open Scholarly Annotation
Supporting Open Scholarly Annotation
 
Supporting Web-based Scholarly Annotation
Supporting Web-based Scholarly AnnotationSupporting Web-based Scholarly Annotation
Supporting Web-based Scholarly Annotation
 
Annotations Supporting Scholarly Editing (OA European Roll Out)
Annotations Supporting Scholarly Editing (OA European Roll Out)Annotations Supporting Scholarly Editing (OA European Roll Out)
Annotations Supporting Scholarly Editing (OA European Roll Out)
 
Annotation Tools (OA European Roll Out)
Annotation Tools (OA European Roll Out)Annotation Tools (OA European Roll Out)
Annotation Tools (OA European Roll Out)
 
Intro to data visualisation
Intro to data visualisationIntro to data visualisation
Intro to data visualisation
 
Annotations Supporting Scholarly Editing
Annotations Supporting Scholarly EditingAnnotations Supporting Scholarly Editing
Annotations Supporting Scholarly Editing
 
Getting started with the Trove API
Getting started with the Trove APIGetting started with the Trove API
Getting started with the Trove API
 
Intro to Java
Intro to JavaIntro to Java
Intro to Java
 
HackFest Brisbane: Discover Brisbane
HackFest Brisbane: Discover BrisbaneHackFest Brisbane: Discover Brisbane
HackFest Brisbane: Discover Brisbane
 
Using Yahoo Pipes
Using Yahoo PipesUsing Yahoo Pipes
Using Yahoo Pipes
 

Recently uploaded

➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men 🔝kakinada🔝 Escor...
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men  🔝kakinada🔝   Escor...➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men  🔝kakinada🔝   Escor...
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men 🔝kakinada🔝 Escor...
amitlee9823
 
Just Call Vip call girls godhra Escorts ☎️9352988975 Two shot with one girl (...
Just Call Vip call girls godhra Escorts ☎️9352988975 Two shot with one girl (...Just Call Vip call girls godhra Escorts ☎️9352988975 Two shot with one girl (...
Just Call Vip call girls godhra Escorts ☎️9352988975 Two shot with one girl (...
gajnagarg
 
Abortion pills in Jeddah |+966572737505 | Get Cytotec
Abortion pills in Jeddah |+966572737505 | Get CytotecAbortion pills in Jeddah |+966572737505 | Get Cytotec
Abortion pills in Jeddah |+966572737505 | Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...
gajnagarg
 
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
motiram463
 
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
tufbav
 
CHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
amitlee9823
 
Just Call Vip call girls daman Escorts ☎️9352988975 Two shot with one girl (d...
Just Call Vip call girls daman Escorts ☎️9352988975 Two shot with one girl (d...Just Call Vip call girls daman Escorts ☎️9352988975 Two shot with one girl (d...
Just Call Vip call girls daman Escorts ☎️9352988975 Two shot with one girl (d...
gajnagarg
 
Just Call Vip call girls Shillong Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls Shillong Escorts ☎️9352988975 Two shot with one girl...Just Call Vip call girls Shillong Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls Shillong Escorts ☎️9352988975 Two shot with one girl...
gajnagarg
 
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
amitlee9823
 
Just Call Vip call girls chhindwara Escorts ☎️9352988975 Two shot with one gi...
Just Call Vip call girls chhindwara Escorts ☎️9352988975 Two shot with one gi...Just Call Vip call girls chhindwara Escorts ☎️9352988975 Two shot with one gi...
Just Call Vip call girls chhindwara Escorts ☎️9352988975 Two shot with one gi...
gajnagarg
 
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
ougvy
 
Call Girls Chickpet ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Chickpet ☎ 7737669865☎ Book Your One night Stand (Bangalore)Call Girls Chickpet ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Chickpet ☎ 7737669865☎ Book Your One night Stand (Bangalore)
amitlee9823
 

Recently uploaded (20)

➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men 🔝kakinada🔝 Escor...
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men  🔝kakinada🔝   Escor...➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men  🔝kakinada🔝   Escor...
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men 🔝kakinada🔝 Escor...
 
Just Call Vip call girls godhra Escorts ☎️9352988975 Two shot with one girl (...
Just Call Vip call girls godhra Escorts ☎️9352988975 Two shot with one girl (...Just Call Vip call girls godhra Escorts ☎️9352988975 Two shot with one girl (...
Just Call Vip call girls godhra Escorts ☎️9352988975 Two shot with one girl (...
 
Abortion pills in Jeddah |+966572737505 | Get Cytotec
Abortion pills in Jeddah |+966572737505 | Get CytotecAbortion pills in Jeddah |+966572737505 | Get Cytotec
Abortion pills in Jeddah |+966572737505 | Get Cytotec
 
Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...
 
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
 
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
 
(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7
(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7
(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7
 
CHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
 
Get Premium Pimple Saudagar Call Girls (8005736733) 24x7 Rate 15999 with A/c ...
Get Premium Pimple Saudagar Call Girls (8005736733) 24x7 Rate 15999 with A/c ...Get Premium Pimple Saudagar Call Girls (8005736733) 24x7 Rate 15999 with A/c ...
Get Premium Pimple Saudagar Call Girls (8005736733) 24x7 Rate 15999 with A/c ...
 
Escorts Service Daryaganj - 9899900591 College Girls & Models 24/7
Escorts Service Daryaganj - 9899900591 College Girls & Models 24/7Escorts Service Daryaganj - 9899900591 College Girls & Models 24/7
Escorts Service Daryaganj - 9899900591 College Girls & Models 24/7
 
Just Call Vip call girls daman Escorts ☎️9352988975 Two shot with one girl (d...
Just Call Vip call girls daman Escorts ☎️9352988975 Two shot with one girl (d...Just Call Vip call girls daman Escorts ☎️9352988975 Two shot with one girl (d...
Just Call Vip call girls daman Escorts ☎️9352988975 Two shot with one girl (d...
 
Just Call Vip call girls Shillong Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls Shillong Escorts ☎️9352988975 Two shot with one girl...Just Call Vip call girls Shillong Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls Shillong Escorts ☎️9352988975 Two shot with one girl...
 
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
Just Call Vip call girls chhindwara Escorts ☎️9352988975 Two shot with one gi...
Just Call Vip call girls chhindwara Escorts ☎️9352988975 Two shot with one gi...Just Call Vip call girls chhindwara Escorts ☎️9352988975 Two shot with one gi...
Just Call Vip call girls chhindwara Escorts ☎️9352988975 Two shot with one gi...
 
Point of Care Testing in clinical laboratory
Point of Care Testing in clinical laboratoryPoint of Care Testing in clinical laboratory
Point of Care Testing in clinical laboratory
 
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
 
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
 
Call Girls Chickpet ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Chickpet ☎ 7737669865☎ Book Your One night Stand (Bangalore)Call Girls Chickpet ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Chickpet ☎ 7737669865☎ Book Your One night Stand (Bangalore)
 

Iot 101

  • 1. IOT  101   CompCon  2016  Workshop   Anna  Gerber  
  • 2. Solderless  Breadboard   •  Use  to  prototype  circuits   •  Numbered  rows  are  connected   •  Some  have  power  rails  along  the  sides  
  • 3. LEDs   •  Light  EmiIng  Diode   •  Polarized:  diodes  act  like  one  way  valves  so   must  be  connected  in  a  certain  direcMon   •  Emits  light  when  a  current  passes  through   Anode  (+)     longer  lead   connects  to  power   Cathode  (-­‐)     connects  to  ground  
  • 4. Resistors   •  Introduces  resistance,  so  restricts  the  amount   of  current  that  can  flow  through  a  circuit   •  Can  be  connected  in  either  direcMon   •  Bend  and  trim  the  leads  to  approx  1cm  each   make  it  easier  to  use  with  the  breadboard  
  • 5.
  • 6. Resistors   •  330  ohm  resistor   (orange,  orange,  brown,   gold)  –  use  with  LEDs   •  10K  resistor  (black,   brown,  orange,  gold)  –   use  with  LDR  
  • 8. Connect  an  LED   •  Connect  LED  to  pin   D1  (GPIO  16)   •  Connect  330  ohm   resistor  to  GND   •  Long  pin  (+)  of  LED   goes  to  pin  D1  
  • 9. Loading  programs  onto  the  board    Use  Arduino   Integrated   Development   Environment  (IDE)   to  write  and  send   programs  to  run  on   the  micro-­‐ controller  
  • 10. Blink   #define  LEDPIN  16   void  setup()  {      pinMode(LEDPIN,  OUTPUT);   }   void  loop()  {      digitalWrite(LEDPIN,  HIGH);            delay(1000);                                  digitalWrite(LEDPIN,  LOW);              delay(1000);                               }  
  • 11. Add  ESP8266  to  Arduino   •  Open  Arduino  IDE   •  Open  Preferences   •  Add  ESP8266  to  Boards  Manager  URL   – hcp://arduino.esp8266.com/stable/ package_esp8266com_index.json   •  Open  Tools  >  Board  >  Board  Manager   – Search  for  ESP8266  and  install  
  • 12.
  • 13.
  • 14.
  • 15. Uploading  the  code   •  Select  the  board   – Tools  >  Board  >  Node  MCU  1.0   •  Select  the  port   – Tools  >  Port  >  (the  port  for  your  board)   •  Click  on  the  Upload  bucon  (arrow  poinMng   right)   •  Messages  are  displayed  at  the  bocom  of  the   Arduino  window  
  • 16. Neopixels   •  WS2812B  light  source   – Chainable,  individually  addressable  RGB  LEDs   – Many  formfactors  (pixel,  ring,  bar,  strip  etc)   – Each  unit  is  connected  via  3.3V,  GND  and  data  pin   – Use  external  power  if  working  with  more  than  a   few  LEDs     •  See   hcps://learn.adafruit.com/adafruit-­‐neopixel-­‐ uberguide/overview  
  • 17. Install  the  Neopixel  library   •  Install  Library  using  Library  Manager:   – Sketch  >    Include  Library  >  Manage  Libraries   – Search  for  Neopixel   •  OR  Download  library  files  from:   – hcps://github.com/adafruit/Adafruit_NeoPixel     •  Copy  files  into  your  Arduino  Libraries  folder   •  Restart  Arduino  IDE  
  • 18.
  • 19. Connect  the  Neopixel  strip   Always  disconnect  power  before  acaching  strip   Connect  ground  first  
  • 20. Programming  Neopixels   Open  File  >  Examples  >  AdaFruit_Neopixel  >  simple   Include  the  library  and  set  up  the  strip:   #include  <Adafruit_NeoPixel.h>   Adafruit_NeoPixel  strip  =  Adafruit_NeoPixel(8,  4,  NEO_GRB  +   NEO_KHZ800);   Number  of  LEDs  in  strip  is  8   Pin  that  strip  is  connected  to  is  4  (D2)   The  last  input  parameter  controls  color  order  &  frequency  for  strip  
  • 21. Programming  Neopixels   void  setup()  {      strip.begin();      strip.show();  //  all  pixels  off  to  start   }   Set  a  pixel  with  setPixelColor(pin,  color)   Follow  with  strip.show()  to  make  it  live   e.g.  set  the  first  neopixel  in  the  strip  (pixel  0)  to  red:   //  Color  takes  R,  G,  B  values  (0  –  255)   strip.setPixelColor(0,  strip.Color(255,  0,  0));   strip.show();  
  • 22. Neopixel  example  program   #include  <Adafruit_NeoPixel.h>   #define  PIN                        4   #define  NUMPIXELS            8   Adafruit_NeoPixel  pixels  =  Adafruit_NeoPixel(NUMPIXELS,  PIN,  NEO_GRB  +  NEO_KHZ800);   void  setup()  {      pixels.begin();   }   void  loop()  {      for(int  i=0;i<NUMPIXELS;i++){          pixels.setPixelColor(i,  pixels.Color(0,150,0));            pixels.show();            delay(500);        }   }  
  • 23. Custom  funcMons   •  Every  Arduino  program  has  setup  and  loop  funcMons  but  you   can  add  extra  funcMons  to  split  code  into  reusable,   manageable  chunks   •  FuncMons  can  return  a  result  e.g.  boolean  (true/false)  or  void   if  they  don't   boolean  checkValue(int  value)  {      if  (value  >  threshold)  {          digitalWrite(LEDPIN,  HIGH);          return  true;      }  else  {        digitalWrite(LEDPIN,  LOW);        return  false;      }   }  
  • 24. Custom  Neopixel  funcMons   Create  custom  funcMons  for  different  pacerns  and  behaviour  e.g:   Call  randomCycle(20);  to  use  funcMon  with  20  millisecond  delay   void  randomCycle(int  wait)  {          for(int  i  =  0;  i  <  strip.numPixels();  i++)  {              strip.setPixelColor(i,  strip.Color(                  random(256),  random(256),  random(256)              ));          }          strip.show();          delay(wait);   }   See  File  >  Examples  >  AdaFruit_Neopixel  >  strandtest  for  examples  
  • 25. Photo  Resistor   •  Non-­‐polarized   •  Connect  one  lead  to  ground   •  Connect  the  other  lead  to  an  Analog  pin   and  also  a  10K  pull-­‐up  resistor  to  3.3V   •  Also  known  as  LDR  (light  dependent   resistor)  or  photocell  
  • 26.
  • 27. Read  from  photo  resistor   const  int  analogInPin  =  A0;       int  sensorValue  =  0;   void  setup()  {    Serial.begin(115200);   }   void  loop()  {    sensorValue  =  analogRead(analogInPin);    Serial.print("sensor  =  ");      Serial.prinlnt(sensorValue);    delay(500);   }   Open  Tools  >  Serial  Monitor