SlideShare una empresa de Scribd logo
1 de 55
Descargar para leer sin conexión
The Arduino Platform
     Eoin Brazil




                http://www.flickr.com/photos/collinmel/2317520331/
What is Arduino?


                   The development
The hardware                         The community
                     environment
Why Arduino?


        artists & designers
        “opportunistic prototyping”
               device hacking & reuse
        “open source hardware”
               Open Source Physical Computing Platform
        open source
               free to inspect & modify
        community
               wiki, forums, tutorials
The Nuts & Bolts


     physical computing. er, what? ubiquitous computing,
   pervasive computing, ambient intelligence, calm
   computing, everyware, spimes, blogjects, smart
   objects...
      tiny computer you can program
      completely stand-alone, talks to other devices
          ‘C’                      Ruby
          Flash                    Python
          Processing               PHP
          PD                       Matlab
          Max/MSP                  Squeak (Smalltalk)
Arduino Capabilities




                       =
 Intel 286                 Arduino
Layout of an Arduino




                                          Reset Button - S1 (dark blue)
 Digital Ground (light green)                                                     Toggles External Power and USB
                                          In-circuit Serial Programmer (blue-
 Digital Pins 2-13 (green)                                                      Power (place jumper on two pins
                                        green)                                  closest to desired supply) - SV1
 Digital Pins 0-1/Serial In/Out - TX/
                                          Analog Reference pin (orange)         (purple)
RX (dark green)
                                          Analog In Pins 0-5 (light blue)         USB (used for uploading sketches
      These pins cannot be used for
                                                                                to the board and for serial
      digital i/o (digitalRead and        Power and Ground Pins (power:
                                                                                communication between the board
      digitalWrite) if you are also     orange, grounds: light orange)
                                                                                and the computer; can be used to
      using serial communiation (e.g.     External Power Supply In
                                                                                power the board) (yellow)
      Serial.begin).                    (9-12VDC) - X1 (pink)
Arduino Glossary


     ``sketch’’ - program that runs on the board
     ``pin’’ - input or output connected to
 something, e.g. output to an LED, input from switch

     ``digital’’ - 1 (HIGH) or 0 (LOW) value (i.e. on/
 off)

     ``analog’’ - range (0-255 typically), e.g. LED
 brightness
Arduino Connections
Arduino Connections


                      Bluetooth - BlueSmirf
                      Internet - MatchPort
                          Many others:
                      Wifi, IrDa, Zigbee, etc.
Arduino Connections




                      Motors:
                DC, Steppers, Servos
Arduino Connections




             Sensors:
      Flex, IrDa, Switches,
      FSR, Accelerometers
Arduino Connections




                 Custom Hardware:
              e.g.VMusic 2 MP3 player
Lilypad


   A set of stitchable controllers,
sensors and actuators enables
novices to build their own
electronic textiles.
Existing Toolkits
Existing Toolkits



                    Expensive but
                     user friendly
Existing Toolkits



                     Expensive but
                      user friendly


  Sufficient for
almost all needs
Existing Toolkits



                     Expensive but
                      user friendly

                             Chips and
  Sufficient for                PCBs
almost all needs
Cost / Difficulty
   Tradeoff

Lego Mindstorm NXT    Arduino




                     ATMega168
Cost / Difficulty
   Tradeoff

Lego Mindstorm NXT    Arduino




                     ATMega168
Approx.
 ~€250
Cost / Difficulty
   Tradeoff

Lego Mindstorm NXT    Arduino


                                 Approx.
                                  ~€25

                     ATMega168
Approx.
 ~€250
Cost / Difficulty
   Tradeoff

Lego Mindstorm NXT    Arduino


                                 Approx.
                                  ~€25

                                 Approx.
                     ATMega168
                                  ~€4
Approx.
 ~€250
Development Style



          Opportunistic
          Development
Development Style



        Big / Heavyweight
             Software
Development Style



       Glue / Surface Level
           Integration
Development Style



         Dovetails / Tight
           Integration
Development Style

   Definition: A Mash-up is a
   combination of existing
   technologies glued together
   to create new functionality
Examples
Accelerometer & RGB
        LED
Accelerometer & RGB
        LED
Hanging Gardens -
Another Example
Hanging Gardens -
Another Example



                    Hanging Gardens:
                    Collaboration with Jürgen Simpson

                    Two Places - UL / Ormeau, Belfast

                    Network of Speakers and Sensors

                    Arduino, Ruby, Max/MSP

                    2 field of insects

                    Circadian rhythm

                    Walls and nodes
Communication -
   Blogject




                     Botanicalls
                    Sensors to
                  Arduino
                     Arduino to
                  XPort to Twitter
Communication -
   Blogject
Example of SL to
      RL
Example of SL to
      RL


    SL to RL
   LSL script for SL
objects
   LSL to PHP
webserver with
connected Arduino
   PHP to Arduino’s
serial port
Spimes - An Internet
     of Things
Spimes - An Internet
     of Things
Programming
Programming an
   Arduino


                   Write program

                    Compile (check
                 for errors)

                   Reset board

                   Upload to board
An Arduino
 “Sketch”
Main Arduino
 Functions


       pinMode()

       digitalWrite() / digitalRead()

       analogRead() / analogWrite()

       delay()

       millis()
Input / Output




       14 Digital IO (pins 0 - 13)
       6 Analog In (pins 0 - 5)
       6 Analog Out (pins 3, 5, 6, 9, 10, 11)
Hello World!


                                        Install latest Arduino IDE from arduino.cc
void setup()                            Run Arduino IDE
{
                                        Write the code on the left into the editor
  // start serial port at 9600 bps:
  Serial.begin(9600);                    Compile / Verify the code by clicking the
}                                     play button
                                        Before uploading your sketch, check the
void loop()                           board and the serial port are correct for
{                                     your Arduino and for your computer
  Serial.print(quot;Hello World!nrquot;);        Menu -> Tools -> Board
  // wait 2sec for next reading:
                                           Menu -> Tools -> Serial Port
  delay(2000);
}                                        Upload the code from the computer to
                                      the Arduino using the upload button
Blinking LED

 /* Blinking LED ---
 * turns on and off a light emitting diode(LED) connected to a digital
 * pin, based on data coming over serial
 */

 int ledPin = 13; // LED connected to digital pin 13
 int inByte = 0;

 void setup()
 {
 	     pinMode(ledPin, OUTPUT); // sets the digital pin as output
 	     Serial.begin(19200); // initiate serial communication
 }

 void loop()
 {
 	      while (Serial.available()>0) {
 	      	     inByte = Serial.read();
 	      }
 	      if (inByte>0) {
 	      	     digitalWrite(ledPin, HIGH); // sets the LED on
 	      } else {
 	      	     digitalWrite(ledPin, LOW); // sets the LED off
 	      }
 }
Blinking LED

 /* Blinking LED ---
 * turns on and off a light emitting diode(LED) connected to a digital
 * pin, based on data coming over serial

                                                                           Initialise
 */



                                                                         some of the
 int ledPin = 13; // LED connected to digital pin 13
 int inByte = 0;

                                                                           variables
 void setup()
 {
 	     pinMode(ledPin, OUTPUT); // sets the digital pin as output
 	     Serial.begin(19200); // initiate serial communication
 }

 void loop()
 {
 	      while (Serial.available()>0) {
 	      	     inByte = Serial.read();
 	      }
 	      if (inByte>0) {
 	      	     digitalWrite(ledPin, HIGH); // sets the LED on
 	      } else {
 	      	     digitalWrite(ledPin, LOW); // sets the LED off
 	      }
 }
Blinking LED

 /* Blinking LED ---
 * turns on and off a light emitting diode(LED) connected to a digital
 * pin, based on data coming over serial

                                                                         Setup LED pin and
 */

 int ledPin = 13; // LED connected to digital pin 13
                                                                          serial connection
 int inByte = 0;

 void setup()
 {
 	     pinMode(ledPin, OUTPUT); // sets the digital pin as output
 	     Serial.begin(19200); // initiate serial communication
 }

 void loop()
 {
 	      while (Serial.available()>0) {
 	      	     inByte = Serial.read();
 	      }
 	      if (inByte>0) {
 	      	     digitalWrite(ledPin, HIGH); // sets the LED on
 	      } else {
 	      	     digitalWrite(ledPin, LOW); // sets the LED off
 	      }
 }
Blinking LED

 /* Blinking LED ---

                                                                          Loop - Reading the
 * turns on and off a light emitting diode(LED) connected to a digital
 * pin, based on data coming over serial
 */

                                                                          serial for info, when
 int ledPin = 13; // LED connected to digital pin 13
                                                                         something is received
 int inByte = 0;


                                                                            turn the LED on
 void setup()
 {
 	     pinMode(ledPin, OUTPUT); // sets the digital pin as output
 	     Serial.begin(19200); // initiate serial communication
 }

 void loop()
 {
 	      while (Serial.available()>0) {
 	      	     inByte = Serial.read();
 	      }
 	      if (inByte>0) {
 	      	     digitalWrite(ledPin, HIGH); // sets the LED on
 	      } else {
 	      	     digitalWrite(ledPin, LOW); // sets the LED off
 	      }
 }
Push button LED

/* Digital reading, turns on and off a light emitting diode (LED) connected to digital
* pin 13, when pressing a pushbutton attached to pin 7. It illustrates the concept of
* Active-Low, which consists in connecting buttons using a 1K to 10K pull-up resistor.
*/

int ledPin = 13; // choose the pin for the LED
int inPin = 7; // choose the input pin (button)
int buttonval = 0; // variable for reading the pin status

void setup() {
	     pinMode(ledPin, OUTPUT); // set LED as output
	     pinMode(inPin, INPUT); // set pushbutton as input
	     Serial.begin(19200); // start serial communication to computer
}

void loop() {
	      buttonval = digitalRead(inPin); // read the pin and get the button's state
	      if (buttonval == HIGH) { // check if the input is HIGH (button released)
	      	     digitalWrite(ledPin, LOW); // turn LED OFF
	      	     Serial.write('0'); // Button off (0) sent to computer
	      } else {
	      	     digitalWrite(ledPin, HIGH); // turn LED ON
	      	     Serial.write('1'); // Button on (1) sent to computer
	      }
}
Push button LED

/* Digital reading, turns on and off a light emitting diode (LED) connected to digital
* pin 13, when pressing a pushbutton attached to pin 7. It illustrates the concept of
* Active-Low, which consists in connecting buttons using a 1K to 10K pull-up resistor.
*/
                                                                                           Initialise
int ledPin = 13; // choose the pin for the LED
                                                                                         some of the
int inPin = 7; // choose the input pin (button)
int buttonval = 0; // variable for reading the pin status
                                                                                           variables
void setup() {
	     pinMode(ledPin, OUTPUT); // set LED as output
	     pinMode(inPin, INPUT); // set pushbutton as input
	     Serial.begin(19200); // start serial communication to computer
}

void loop() {
	      buttonval = digitalRead(inPin); // read the pin and get the button's state
	      if (buttonval == HIGH) { // check if the input is HIGH (button released)
	      	     digitalWrite(ledPin, LOW); // turn LED OFF
	      	     Serial.write('0'); // Button off (0) sent to computer
	      } else {
	      	     digitalWrite(ledPin, HIGH); // turn LED ON
	      	     Serial.write('1'); // Button on (1) sent to computer
	      }
}
Push button LED

/* Digital reading, turns on and off a light emitting diode (LED) connected to digital
* pin 13, when pressing a pushbutton attached to pin 7. It illustrates the concept of
                                                                                     Setup LED pin,
* Active-Low, which consists in connecting buttons using a 1K to 10K pull-up resistor.
*/

                                                                                     switch pin and
int ledPin = 13; // choose the pin for the LED
int inPin = 7; // choose the input pin (button)
                                                                                    serial connection
int buttonval = 0; // variable for reading the pin status

void setup() {
	     pinMode(ledPin, OUTPUT); // set LED as output
	     pinMode(inPin, INPUT); // set pushbutton as input
	     Serial.begin(19200); // start serial communication to computer
}

void loop() {
	      buttonval = digitalRead(inPin); // read the pin and get the button's state
	      if (buttonval == HIGH) { // check if the input is HIGH (button released)
	      	     digitalWrite(ledPin, LOW); // turn LED OFF
	      	     Serial.write('0'); // Button off (0) sent to computer
	      } else {
	      	     digitalWrite(ledPin, HIGH); // turn LED ON
	      	     Serial.write('1'); // Button on (1) sent to computer
	      }
}
Push button LED

/* Digital reading, turns on and off a light emitting diode (LED) connected to digital
* pin 13, when pressing a pushbutton attached to pin 7. It illustrates the concept of
* Active-Low, which consists in connecting buttons using a 1K to 10K pull-up resistor.

                                                              Loop - Reading the
*/


                                                            button for info, when
int ledPin = 13; // choose the pin for the LED
int inPin = 7; // choose the input pin (button)
                                                             button is press turn
int buttonval = 0; // variable for reading the pin status

                                                           the LED on and signal
void setup() {
                                                                the computer of
	      pinMode(ledPin, OUTPUT); // set LED as output
	      pinMode(inPin, INPUT); // set pushbutton as input
       Serial.begin(19200); // start serial communication to computer change
	
}

void loop() {
	      buttonval = digitalRead(inPin); // read the pin and get the button's state
	      if (buttonval == HIGH) { // check if the input is HIGH (button released)
	      	     digitalWrite(ledPin, LOW); // turn LED OFF
	      	     Serial.write('0'); // Button off (0) sent to computer
	      } else {
	      	     digitalWrite(ledPin, HIGH); // turn LED ON
	      	     Serial.write('1'); // Button on (1) sent to computer
	      }
}
Useful Stuff
Protocols and Proxies

Proxy: Conversion of                 Protocol: Structured
communication to another type        conversation
    Network serial (Serial to TCP)       Midi / OSC
   TinkerProxy / Griffin Proxi            DMX512
    osculator                            X10, INSTEON
    Girder (Windows)
    Shion, Indigo
    Sydewynder
Suggested Books
Useful Links

  Arduino - http://www.arduino.cc/

  Arduino lectures - http://www.slideshare.net/eoinbrazil

  Tod E. Kurt’s blog (check his Spooky Arduino projects) - http://
todbot.com/blog/category/arduino/

  ITP Physical Computing - http://itp.nyu.edu/physcomp/Intro/HomePage

  The Art and Craft of Toy Design - http://yg.typepad.com/makingtoys2/

   Lilypad - http://www.cs.colorado.edu/~buechley/diy/
diy_lilypad_arduino.html

   Usman Haque and Adam Somlai-Fischer - ``Low tech sensors and
actuators for artists and architects’’

Más contenido relacionado

La actualidad más candente

Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to ArduinoOmer Kilic
 
Introduction to the Arduino
Introduction to the ArduinoIntroduction to the Arduino
Introduction to the ArduinoWingston
 
Introduction to Arduino Hardware and Programming
Introduction to Arduino Hardware and ProgrammingIntroduction to Arduino Hardware and Programming
Introduction to Arduino Hardware and ProgrammingEmmanuel Obot
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to ArduinoYong Heui Cho
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduinoyeokm1
 
Arduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic ArduinoArduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic ArduinoVishnu
 
Arduino Workshop
Arduino WorkshopArduino Workshop
Arduino Workshopatuline
 
Arduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIYArduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIYVishnu
 
Introduction to arduino ppt main
Introduction to  arduino ppt mainIntroduction to  arduino ppt main
Introduction to arduino ppt maineddy royappa
 
Lesson sample introduction to arduino
Lesson sample   introduction to arduinoLesson sample   introduction to arduino
Lesson sample introduction to arduinoBetsy Eng
 
ESP8266 and IOT
ESP8266 and IOTESP8266 and IOT
ESP8266 and IOTdega1999
 
Humidity and Temperature Measurement Using Arduino
Humidity and Temperature Measurement Using ArduinoHumidity and Temperature Measurement Using Arduino
Humidity and Temperature Measurement Using Arduinodollonhaider
 
Basics of open source embedded development board (
Basics of open source embedded development board (Basics of open source embedded development board (
Basics of open source embedded development board (Dhruwank Vankawala
 

La actualidad más candente (20)

Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Introduction to the Arduino
Introduction to the ArduinoIntroduction to the Arduino
Introduction to the Arduino
 
Introduction to Arduino Hardware and Programming
Introduction to Arduino Hardware and ProgrammingIntroduction to Arduino Hardware and Programming
Introduction to Arduino Hardware and Programming
 
Arduino course
Arduino courseArduino course
Arduino course
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Arduino presentation
Arduino presentationArduino presentation
Arduino presentation
 
Ardui no
Ardui no Ardui no
Ardui no
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Arduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic ArduinoArduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic Arduino
 
Arduino Workshop
Arduino WorkshopArduino Workshop
Arduino Workshop
 
Arduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIYArduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIY
 
Introduction to arduino ppt main
Introduction to  arduino ppt mainIntroduction to  arduino ppt main
Introduction to arduino ppt main
 
Lesson sample introduction to arduino
Lesson sample   introduction to arduinoLesson sample   introduction to arduino
Lesson sample introduction to arduino
 
Introducción a arduino
Introducción a arduinoIntroducción a arduino
Introducción a arduino
 
ESP8266 and IOT
ESP8266 and IOTESP8266 and IOT
ESP8266 and IOT
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Humidity and Temperature Measurement Using Arduino
Humidity and Temperature Measurement Using ArduinoHumidity and Temperature Measurement Using Arduino
Humidity and Temperature Measurement Using Arduino
 
What is Arduino ?
What is Arduino ?What is Arduino ?
What is Arduino ?
 
Basics of open source embedded development board (
Basics of open source embedded development board (Basics of open source embedded development board (
Basics of open source embedded development board (
 
Different Arduino Boards
Different Arduino BoardsDifferent Arduino Boards
Different Arduino Boards
 

Destacado

Green-house-environment-control
 Green-house-environment-control Green-house-environment-control
Green-house-environment-controlGherghescu Gabriel
 
Wireless greenhouse environment monitoring through sensors
Wireless greenhouse environment monitoring through sensorsWireless greenhouse environment monitoring through sensors
Wireless greenhouse environment monitoring through sensorsSudhanshu Tripathi
 
Green house weather control system
Green house weather control systemGreen house weather control system
Green house weather control systemShiven Vashisht
 
Greenhouse technology
Greenhouse technologyGreenhouse technology
Greenhouse technologyagrihortico
 
Arduino based intelligent greenhouse Project
Arduino based intelligent greenhouse ProjectArduino based intelligent greenhouse Project
Arduino based intelligent greenhouse ProjectAmit Saini
 
Green house ppt
Green house pptGreen house ppt
Green house pptTaherbond
 

Destacado (6)

Green-house-environment-control
 Green-house-environment-control Green-house-environment-control
Green-house-environment-control
 
Wireless greenhouse environment monitoring through sensors
Wireless greenhouse environment monitoring through sensorsWireless greenhouse environment monitoring through sensors
Wireless greenhouse environment monitoring through sensors
 
Green house weather control system
Green house weather control systemGreen house weather control system
Green house weather control system
 
Greenhouse technology
Greenhouse technologyGreenhouse technology
Greenhouse technology
 
Arduino based intelligent greenhouse Project
Arduino based intelligent greenhouse ProjectArduino based intelligent greenhouse Project
Arduino based intelligent greenhouse Project
 
Green house ppt
Green house pptGreen house ppt
Green house ppt
 

Similar a IOTC08 The Arduino Platform

Similar a IOTC08 The Arduino Platform (20)

Cassiopeia Ltd - standard Arduino workshop
Cassiopeia Ltd - standard Arduino workshopCassiopeia Ltd - standard Arduino workshop
Cassiopeia Ltd - standard Arduino workshop
 
Basics of open source embedded development board (
Basics of open source embedded development board (Basics of open source embedded development board (
Basics of open source embedded development board (
 
Arduino workshop
Arduino workshopArduino workshop
Arduino workshop
 
Microcontroller arduino uno board
Microcontroller arduino uno boardMicrocontroller arduino uno board
Microcontroller arduino uno board
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Ardu
ArduArdu
Ardu
 
Neno Project.docx
Neno Project.docxNeno Project.docx
Neno Project.docx
 
Arduino اردوينو
Arduino اردوينوArduino اردوينو
Arduino اردوينو
 
Report on arduino
Report on arduinoReport on arduino
Report on arduino
 
Introduction to arduino
Introduction to arduinoIntroduction to arduino
Introduction to arduino
 
Arduino Programming Basic
Arduino Programming BasicArduino Programming Basic
Arduino Programming Basic
 
Aurdino presentation
Aurdino presentationAurdino presentation
Aurdino presentation
 
Arduino spooky projects_class3
Arduino spooky projects_class3Arduino spooky projects_class3
Arduino spooky projects_class3
 
Arduino 123
Arduino 123Arduino 123
Arduino 123
 
Unit 2-IoT.ppt Introduction to Elements of IOT
Unit 2-IoT.ppt  Introduction to Elements of IOTUnit 2-IoT.ppt  Introduction to Elements of IOT
Unit 2-IoT.ppt Introduction to Elements of IOT
 
Arduino Workshop Slides
Arduino Workshop SlidesArduino Workshop Slides
Arduino Workshop Slides
 
Intro to Arduino
Intro to ArduinoIntro to Arduino
Intro to Arduino
 
Intro arduino
Intro arduinoIntro arduino
Intro arduino
 
Arduino 8-step drum sequencer 3 channels
Arduino 8-step drum sequencer 3 channelsArduino 8-step drum sequencer 3 channels
Arduino 8-step drum sequencer 3 channels
 
SKAD Electronics Training Manual.pdf
SKAD Electronics Training Manual.pdfSKAD Electronics Training Manual.pdf
SKAD Electronics Training Manual.pdf
 

Más de Eoin Brazil

Pragmatic Analytics - Case Studies of High Performance Computing for Better B...
Pragmatic Analytics - Case Studies of High Performance Computing for Better B...Pragmatic Analytics - Case Studies of High Performance Computing for Better B...
Pragmatic Analytics - Case Studies of High Performance Computing for Better B...Eoin Brazil
 
Introduction to Machine Learning using R - Dublin R User Group - Oct 2013
Introduction to Machine Learning using R - Dublin R User Group - Oct 2013Introduction to Machine Learning using R - Dublin R User Group - Oct 2013
Introduction to Machine Learning using R - Dublin R User Group - Oct 2013Eoin Brazil
 
Mobile Services from Concept to Reality - Case Studies at the Mobile Service ...
Mobile Services from Concept to Reality - Case Studies at the Mobile Service ...Mobile Services from Concept to Reality - Case Studies at the Mobile Service ...
Mobile Services from Concept to Reality - Case Studies at the Mobile Service ...Eoin Brazil
 
Cloud Computing Examples at ICHEC
Cloud Computing Examples at ICHECCloud Computing Examples at ICHEC
Cloud Computing Examples at ICHECEoin Brazil
 
An example of discovering simple patterns using basic data mining
An example of discovering simple patterns using basic data miningAn example of discovering simple patterns using basic data mining
An example of discovering simple patterns using basic data miningEoin Brazil
 
Bringing HPC to tackle your business problems
Bringing HPC to tackle your business problemsBringing HPC to tackle your business problems
Bringing HPC to tackle your business problemsEoin Brazil
 
Fat Nodes & GPGPUs - Red-shifting your infrastructure without breaking the bu...
Fat Nodes & GPGPUs - Red-shifting your infrastructure without breaking the bu...Fat Nodes & GPGPUs - Red-shifting your infrastructure without breaking the bu...
Fat Nodes & GPGPUs - Red-shifting your infrastructure without breaking the bu...Eoin Brazil
 
Example optimisation using GPGPUs by ICHEC
Example optimisation using GPGPUs by ICHECExample optimisation using GPGPUs by ICHEC
Example optimisation using GPGPUs by ICHECEoin Brazil
 
Ichec is vs-andthecloud
Ichec is vs-andthecloudIchec is vs-andthecloud
Ichec is vs-andthecloudEoin Brazil
 
Mixing Interaction, Sonification, Rendering and Design - The art of creating ...
Mixing Interaction, Sonification, Rendering and Design - The art of creating ...Mixing Interaction, Sonification, Rendering and Design - The art of creating ...
Mixing Interaction, Sonification, Rendering and Design - The art of creating ...Eoin Brazil
 
Arduino Lecture 4 - Interactive Media CS4062 Semester 2 2009
Arduino Lecture 4 - Interactive Media CS4062 Semester 2 2009Arduino Lecture 4 - Interactive Media CS4062 Semester 2 2009
Arduino Lecture 4 - Interactive Media CS4062 Semester 2 2009Eoin Brazil
 
Arduino Lecture 3 - Interactive Media CS4062 Semester 2 2009
Arduino Lecture 3 - Interactive Media CS4062 Semester 2 2009Arduino Lecture 3 - Interactive Media CS4062 Semester 2 2009
Arduino Lecture 3 - Interactive Media CS4062 Semester 2 2009Eoin Brazil
 
Arduino Lecture 3 - Interactive Media CS4062 Semester 2 2009
Arduino Lecture 3 - Interactive Media CS4062 Semester 2 2009Arduino Lecture 3 - Interactive Media CS4062 Semester 2 2009
Arduino Lecture 3 - Interactive Media CS4062 Semester 2 2009Eoin Brazil
 
Arduino Lecture 2 - Interactive Media CS4062 Semester 2 2009
Arduino Lecture 2 - Interactive Media CS4062 Semester 2 2009Arduino Lecture 2 - Interactive Media CS4062 Semester 2 2009
Arduino Lecture 2 - Interactive Media CS4062 Semester 2 2009Eoin Brazil
 
Echoes, Whispers, and Footsteps from the Conflux of Sonic Interaction Design ...
Echoes, Whispers, and Footsteps from the Conflux of Sonic Interaction Design ...Echoes, Whispers, and Footsteps from the Conflux of Sonic Interaction Design ...
Echoes, Whispers, and Footsteps from the Conflux of Sonic Interaction Design ...Eoin Brazil
 
Arduino Lecture 2 - Electronic, LEDs, Communications and Datasheets
Arduino Lecture 2 - Electronic, LEDs, Communications and DatasheetsArduino Lecture 2 - Electronic, LEDs, Communications and Datasheets
Arduino Lecture 2 - Electronic, LEDs, Communications and DatasheetsEoin Brazil
 
Arduino Lecture 1 - Introducing the Arduino
Arduino Lecture 1 - Introducing the ArduinoArduino Lecture 1 - Introducing the Arduino
Arduino Lecture 1 - Introducing the ArduinoEoin Brazil
 
Arduino Lecture 3 - Making Things Move and AVR programming
Arduino Lecture 3 - Making Things Move and AVR programmingArduino Lecture 3 - Making Things Move and AVR programming
Arduino Lecture 3 - Making Things Move and AVR programmingEoin Brazil
 

Más de Eoin Brazil (18)

Pragmatic Analytics - Case Studies of High Performance Computing for Better B...
Pragmatic Analytics - Case Studies of High Performance Computing for Better B...Pragmatic Analytics - Case Studies of High Performance Computing for Better B...
Pragmatic Analytics - Case Studies of High Performance Computing for Better B...
 
Introduction to Machine Learning using R - Dublin R User Group - Oct 2013
Introduction to Machine Learning using R - Dublin R User Group - Oct 2013Introduction to Machine Learning using R - Dublin R User Group - Oct 2013
Introduction to Machine Learning using R - Dublin R User Group - Oct 2013
 
Mobile Services from Concept to Reality - Case Studies at the Mobile Service ...
Mobile Services from Concept to Reality - Case Studies at the Mobile Service ...Mobile Services from Concept to Reality - Case Studies at the Mobile Service ...
Mobile Services from Concept to Reality - Case Studies at the Mobile Service ...
 
Cloud Computing Examples at ICHEC
Cloud Computing Examples at ICHECCloud Computing Examples at ICHEC
Cloud Computing Examples at ICHEC
 
An example of discovering simple patterns using basic data mining
An example of discovering simple patterns using basic data miningAn example of discovering simple patterns using basic data mining
An example of discovering simple patterns using basic data mining
 
Bringing HPC to tackle your business problems
Bringing HPC to tackle your business problemsBringing HPC to tackle your business problems
Bringing HPC to tackle your business problems
 
Fat Nodes & GPGPUs - Red-shifting your infrastructure without breaking the bu...
Fat Nodes & GPGPUs - Red-shifting your infrastructure without breaking the bu...Fat Nodes & GPGPUs - Red-shifting your infrastructure without breaking the bu...
Fat Nodes & GPGPUs - Red-shifting your infrastructure without breaking the bu...
 
Example optimisation using GPGPUs by ICHEC
Example optimisation using GPGPUs by ICHECExample optimisation using GPGPUs by ICHEC
Example optimisation using GPGPUs by ICHEC
 
Ichec is vs-andthecloud
Ichec is vs-andthecloudIchec is vs-andthecloud
Ichec is vs-andthecloud
 
Mixing Interaction, Sonification, Rendering and Design - The art of creating ...
Mixing Interaction, Sonification, Rendering and Design - The art of creating ...Mixing Interaction, Sonification, Rendering and Design - The art of creating ...
Mixing Interaction, Sonification, Rendering and Design - The art of creating ...
 
Arduino Lecture 4 - Interactive Media CS4062 Semester 2 2009
Arduino Lecture 4 - Interactive Media CS4062 Semester 2 2009Arduino Lecture 4 - Interactive Media CS4062 Semester 2 2009
Arduino Lecture 4 - Interactive Media CS4062 Semester 2 2009
 
Arduino Lecture 3 - Interactive Media CS4062 Semester 2 2009
Arduino Lecture 3 - Interactive Media CS4062 Semester 2 2009Arduino Lecture 3 - Interactive Media CS4062 Semester 2 2009
Arduino Lecture 3 - Interactive Media CS4062 Semester 2 2009
 
Arduino Lecture 3 - Interactive Media CS4062 Semester 2 2009
Arduino Lecture 3 - Interactive Media CS4062 Semester 2 2009Arduino Lecture 3 - Interactive Media CS4062 Semester 2 2009
Arduino Lecture 3 - Interactive Media CS4062 Semester 2 2009
 
Arduino Lecture 2 - Interactive Media CS4062 Semester 2 2009
Arduino Lecture 2 - Interactive Media CS4062 Semester 2 2009Arduino Lecture 2 - Interactive Media CS4062 Semester 2 2009
Arduino Lecture 2 - Interactive Media CS4062 Semester 2 2009
 
Echoes, Whispers, and Footsteps from the Conflux of Sonic Interaction Design ...
Echoes, Whispers, and Footsteps from the Conflux of Sonic Interaction Design ...Echoes, Whispers, and Footsteps from the Conflux of Sonic Interaction Design ...
Echoes, Whispers, and Footsteps from the Conflux of Sonic Interaction Design ...
 
Arduino Lecture 2 - Electronic, LEDs, Communications and Datasheets
Arduino Lecture 2 - Electronic, LEDs, Communications and DatasheetsArduino Lecture 2 - Electronic, LEDs, Communications and Datasheets
Arduino Lecture 2 - Electronic, LEDs, Communications and Datasheets
 
Arduino Lecture 1 - Introducing the Arduino
Arduino Lecture 1 - Introducing the ArduinoArduino Lecture 1 - Introducing the Arduino
Arduino Lecture 1 - Introducing the Arduino
 
Arduino Lecture 3 - Making Things Move and AVR programming
Arduino Lecture 3 - Making Things Move and AVR programmingArduino Lecture 3 - Making Things Move and AVR programming
Arduino Lecture 3 - Making Things Move and AVR programming
 

Último

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 

Último (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

IOTC08 The Arduino Platform

  • 1. The Arduino Platform Eoin Brazil http://www.flickr.com/photos/collinmel/2317520331/
  • 2. What is Arduino? The development The hardware The community environment
  • 3. Why Arduino? artists & designers “opportunistic prototyping” device hacking & reuse “open source hardware” Open Source Physical Computing Platform open source free to inspect & modify community wiki, forums, tutorials
  • 4. The Nuts & Bolts physical computing. er, what? ubiquitous computing, pervasive computing, ambient intelligence, calm computing, everyware, spimes, blogjects, smart objects... tiny computer you can program completely stand-alone, talks to other devices ‘C’ Ruby Flash Python Processing PHP PD Matlab Max/MSP Squeak (Smalltalk)
  • 5. Arduino Capabilities = Intel 286 Arduino
  • 6. Layout of an Arduino Reset Button - S1 (dark blue) Digital Ground (light green) Toggles External Power and USB In-circuit Serial Programmer (blue- Digital Pins 2-13 (green) Power (place jumper on two pins green) closest to desired supply) - SV1 Digital Pins 0-1/Serial In/Out - TX/ Analog Reference pin (orange) (purple) RX (dark green) Analog In Pins 0-5 (light blue) USB (used for uploading sketches These pins cannot be used for to the board and for serial digital i/o (digitalRead and Power and Ground Pins (power: communication between the board digitalWrite) if you are also orange, grounds: light orange) and the computer; can be used to using serial communiation (e.g. External Power Supply In power the board) (yellow) Serial.begin). (9-12VDC) - X1 (pink)
  • 7. Arduino Glossary ``sketch’’ - program that runs on the board ``pin’’ - input or output connected to something, e.g. output to an LED, input from switch ``digital’’ - 1 (HIGH) or 0 (LOW) value (i.e. on/ off) ``analog’’ - range (0-255 typically), e.g. LED brightness
  • 9. Arduino Connections Bluetooth - BlueSmirf Internet - MatchPort Many others: Wifi, IrDa, Zigbee, etc.
  • 10. Arduino Connections Motors: DC, Steppers, Servos
  • 11. Arduino Connections Sensors: Flex, IrDa, Switches, FSR, Accelerometers
  • 12. Arduino Connections Custom Hardware: e.g.VMusic 2 MP3 player
  • 13. Lilypad A set of stitchable controllers, sensors and actuators enables novices to build their own electronic textiles.
  • 15. Existing Toolkits Expensive but user friendly
  • 16. Existing Toolkits Expensive but user friendly Sufficient for almost all needs
  • 17. Existing Toolkits Expensive but user friendly Chips and Sufficient for PCBs almost all needs
  • 18. Cost / Difficulty Tradeoff Lego Mindstorm NXT Arduino ATMega168
  • 19. Cost / Difficulty Tradeoff Lego Mindstorm NXT Arduino ATMega168 Approx. ~€250
  • 20. Cost / Difficulty Tradeoff Lego Mindstorm NXT Arduino Approx. ~€25 ATMega168 Approx. ~€250
  • 21. Cost / Difficulty Tradeoff Lego Mindstorm NXT Arduino Approx. ~€25 Approx. ATMega168 ~€4 Approx. ~€250
  • 22. Development Style Opportunistic Development
  • 23. Development Style Big / Heavyweight Software
  • 24. Development Style Glue / Surface Level Integration
  • 25. Development Style Dovetails / Tight Integration
  • 26. Development Style Definition: A Mash-up is a combination of existing technologies glued together to create new functionality
  • 31. Hanging Gardens - Another Example Hanging Gardens: Collaboration with Jürgen Simpson Two Places - UL / Ormeau, Belfast Network of Speakers and Sensors Arduino, Ruby, Max/MSP 2 field of insects Circadian rhythm Walls and nodes
  • 32. Communication - Blogject Botanicalls Sensors to Arduino Arduino to XPort to Twitter
  • 33. Communication - Blogject
  • 35. Example of SL to RL SL to RL LSL script for SL objects LSL to PHP webserver with connected Arduino PHP to Arduino’s serial port
  • 36. Spimes - An Internet of Things
  • 37. Spimes - An Internet of Things
  • 39. Programming an Arduino Write program Compile (check for errors) Reset board Upload to board
  • 41. Main Arduino Functions pinMode() digitalWrite() / digitalRead() analogRead() / analogWrite() delay() millis()
  • 42. Input / Output 14 Digital IO (pins 0 - 13) 6 Analog In (pins 0 - 5) 6 Analog Out (pins 3, 5, 6, 9, 10, 11)
  • 43. Hello World! Install latest Arduino IDE from arduino.cc void setup() Run Arduino IDE { Write the code on the left into the editor // start serial port at 9600 bps: Serial.begin(9600); Compile / Verify the code by clicking the } play button Before uploading your sketch, check the void loop() board and the serial port are correct for { your Arduino and for your computer Serial.print(quot;Hello World!nrquot;); Menu -> Tools -> Board // wait 2sec for next reading: Menu -> Tools -> Serial Port delay(2000); } Upload the code from the computer to the Arduino using the upload button
  • 44. Blinking LED /* Blinking LED --- * turns on and off a light emitting diode(LED) connected to a digital * pin, based on data coming over serial */ int ledPin = 13; // LED connected to digital pin 13 int inByte = 0; void setup() { pinMode(ledPin, OUTPUT); // sets the digital pin as output Serial.begin(19200); // initiate serial communication } void loop() { while (Serial.available()>0) { inByte = Serial.read(); } if (inByte>0) { digitalWrite(ledPin, HIGH); // sets the LED on } else { digitalWrite(ledPin, LOW); // sets the LED off } }
  • 45. Blinking LED /* Blinking LED --- * turns on and off a light emitting diode(LED) connected to a digital * pin, based on data coming over serial Initialise */ some of the int ledPin = 13; // LED connected to digital pin 13 int inByte = 0; variables void setup() { pinMode(ledPin, OUTPUT); // sets the digital pin as output Serial.begin(19200); // initiate serial communication } void loop() { while (Serial.available()>0) { inByte = Serial.read(); } if (inByte>0) { digitalWrite(ledPin, HIGH); // sets the LED on } else { digitalWrite(ledPin, LOW); // sets the LED off } }
  • 46. Blinking LED /* Blinking LED --- * turns on and off a light emitting diode(LED) connected to a digital * pin, based on data coming over serial Setup LED pin and */ int ledPin = 13; // LED connected to digital pin 13 serial connection int inByte = 0; void setup() { pinMode(ledPin, OUTPUT); // sets the digital pin as output Serial.begin(19200); // initiate serial communication } void loop() { while (Serial.available()>0) { inByte = Serial.read(); } if (inByte>0) { digitalWrite(ledPin, HIGH); // sets the LED on } else { digitalWrite(ledPin, LOW); // sets the LED off } }
  • 47. Blinking LED /* Blinking LED --- Loop - Reading the * turns on and off a light emitting diode(LED) connected to a digital * pin, based on data coming over serial */ serial for info, when int ledPin = 13; // LED connected to digital pin 13 something is received int inByte = 0; turn the LED on void setup() { pinMode(ledPin, OUTPUT); // sets the digital pin as output Serial.begin(19200); // initiate serial communication } void loop() { while (Serial.available()>0) { inByte = Serial.read(); } if (inByte>0) { digitalWrite(ledPin, HIGH); // sets the LED on } else { digitalWrite(ledPin, LOW); // sets the LED off } }
  • 48. Push button LED /* Digital reading, turns on and off a light emitting diode (LED) connected to digital * pin 13, when pressing a pushbutton attached to pin 7. It illustrates the concept of * Active-Low, which consists in connecting buttons using a 1K to 10K pull-up resistor. */ int ledPin = 13; // choose the pin for the LED int inPin = 7; // choose the input pin (button) int buttonval = 0; // variable for reading the pin status void setup() { pinMode(ledPin, OUTPUT); // set LED as output pinMode(inPin, INPUT); // set pushbutton as input Serial.begin(19200); // start serial communication to computer } void loop() { buttonval = digitalRead(inPin); // read the pin and get the button's state if (buttonval == HIGH) { // check if the input is HIGH (button released) digitalWrite(ledPin, LOW); // turn LED OFF Serial.write('0'); // Button off (0) sent to computer } else { digitalWrite(ledPin, HIGH); // turn LED ON Serial.write('1'); // Button on (1) sent to computer } }
  • 49. Push button LED /* Digital reading, turns on and off a light emitting diode (LED) connected to digital * pin 13, when pressing a pushbutton attached to pin 7. It illustrates the concept of * Active-Low, which consists in connecting buttons using a 1K to 10K pull-up resistor. */ Initialise int ledPin = 13; // choose the pin for the LED some of the int inPin = 7; // choose the input pin (button) int buttonval = 0; // variable for reading the pin status variables void setup() { pinMode(ledPin, OUTPUT); // set LED as output pinMode(inPin, INPUT); // set pushbutton as input Serial.begin(19200); // start serial communication to computer } void loop() { buttonval = digitalRead(inPin); // read the pin and get the button's state if (buttonval == HIGH) { // check if the input is HIGH (button released) digitalWrite(ledPin, LOW); // turn LED OFF Serial.write('0'); // Button off (0) sent to computer } else { digitalWrite(ledPin, HIGH); // turn LED ON Serial.write('1'); // Button on (1) sent to computer } }
  • 50. Push button LED /* Digital reading, turns on and off a light emitting diode (LED) connected to digital * pin 13, when pressing a pushbutton attached to pin 7. It illustrates the concept of Setup LED pin, * Active-Low, which consists in connecting buttons using a 1K to 10K pull-up resistor. */ switch pin and int ledPin = 13; // choose the pin for the LED int inPin = 7; // choose the input pin (button) serial connection int buttonval = 0; // variable for reading the pin status void setup() { pinMode(ledPin, OUTPUT); // set LED as output pinMode(inPin, INPUT); // set pushbutton as input Serial.begin(19200); // start serial communication to computer } void loop() { buttonval = digitalRead(inPin); // read the pin and get the button's state if (buttonval == HIGH) { // check if the input is HIGH (button released) digitalWrite(ledPin, LOW); // turn LED OFF Serial.write('0'); // Button off (0) sent to computer } else { digitalWrite(ledPin, HIGH); // turn LED ON Serial.write('1'); // Button on (1) sent to computer } }
  • 51. Push button LED /* Digital reading, turns on and off a light emitting diode (LED) connected to digital * pin 13, when pressing a pushbutton attached to pin 7. It illustrates the concept of * Active-Low, which consists in connecting buttons using a 1K to 10K pull-up resistor. Loop - Reading the */ button for info, when int ledPin = 13; // choose the pin for the LED int inPin = 7; // choose the input pin (button) button is press turn int buttonval = 0; // variable for reading the pin status the LED on and signal void setup() { the computer of pinMode(ledPin, OUTPUT); // set LED as output pinMode(inPin, INPUT); // set pushbutton as input Serial.begin(19200); // start serial communication to computer change } void loop() { buttonval = digitalRead(inPin); // read the pin and get the button's state if (buttonval == HIGH) { // check if the input is HIGH (button released) digitalWrite(ledPin, LOW); // turn LED OFF Serial.write('0'); // Button off (0) sent to computer } else { digitalWrite(ledPin, HIGH); // turn LED ON Serial.write('1'); // Button on (1) sent to computer } }
  • 53. Protocols and Proxies Proxy: Conversion of Protocol: Structured communication to another type conversation Network serial (Serial to TCP) Midi / OSC TinkerProxy / Griffin Proxi DMX512 osculator X10, INSTEON Girder (Windows) Shion, Indigo Sydewynder
  • 55. Useful Links Arduino - http://www.arduino.cc/ Arduino lectures - http://www.slideshare.net/eoinbrazil Tod E. Kurt’s blog (check his Spooky Arduino projects) - http:// todbot.com/blog/category/arduino/ ITP Physical Computing - http://itp.nyu.edu/physcomp/Intro/HomePage The Art and Craft of Toy Design - http://yg.typepad.com/makingtoys2/ Lilypad - http://www.cs.colorado.edu/~buechley/diy/ diy_lilypad_arduino.html Usman Haque and Adam Somlai-Fischer - ``Low tech sensors and actuators for artists and architects’’