SlideShare ist ein Scribd-Unternehmen logo
1 von 40
Downloaden Sie, um offline zu lesen
Workshop	
  Makey	
  Makey	
  
      (Arduino)	
  



     Jelle.saldien@howest.be	
  
Arduino	
  
Principle	
  
                                                    Sensors	
  

                                     READ	
  
     Your	
  
    Sketch	
  
      [C]	
  
                               inputs	
  
   UPLOAD	
  
                     ARDUINO	
      ATmega328	
  
COMMUNICATE	
  
                              outputs	
  
                                                    Actuators	
  



                                    WRITE	
  
Examples	
  
Examples	
  
Examples	
  
Arduino	
  Board	
  
Arduino	
  Board	
  
Microcontroller                                ATmega328	
  
Opera-ng	
  Voltage                            5	
  V	
  
Input	
  Voltage	
  (recommended)              7-­‐12	
  V	
  
Input	
  Voltage	
  (limits)                   6-­‐20	
  V	
  
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
                                               32	
  KB	
  (ATmega328)	
  of	
  which	
  2	
  KB	
  used	
  by	
  
Flash	
  Memory
                                               bootloader	
  
SRAM                                           2	
  KB	
  (ATmega328)
EEPROM                                         1	
  KB	
  (ATmega328)
Clock	
  Speed                                 16	
  MHz
Arduino	
  IDE	
  
•  IDE:	
  
    –  Integrated	
  
    –  Development	
  
    –  Environment	
  
Code	
  Structure:	
  setup	
  func`on	
  



                                  setup	
  func`on	
  is	
  executed	
  
                                  only	
  once	
  at	
  the	
  start	
  




10	
  
Code	
  Structure:	
  loop	
  func`on	
  




                                     loop	
  func`on	
  is	
  
                                     repeated	
  indefinitely	
  




11	
  
Code	
  

         pinMode(13, Output)!
         prepare	
  pin	
  13	
  for	
  
         outputs	
  of	
  voltage	
  




                             Digital	
  I/O	
  Func`ons:	
  
                             pinMode	
  
                             digitalWrite	
  
                             digitalRead	
  
12	
  
Code	
  


           digitalWrite(13, HIGH)!
           Sets	
  pin	
  13	
  to	
  a	
  voltage	
  that	
  
           means	
  “on”	
  



                             Digital	
  I/O	
  Func`ons:	
  
                              	
  pinMode	
  
                              	
  digitalWrite	
  
                              	
  digitalRead	
  
13	
  
Code	
  


           delay(1000);!
           Tells	
  microcontroller	
  to	
  do	
  
           nothing	
  for	
  1000	
  ms	
  =	
  1	
  s	
  



                             Digital	
  I/O	
  Func`ons:	
  
                              	
  pinMode	
  
                              	
  digitalWrite	
  
                              	
  digitalRead	
  
14	
  
Code	
  


           digitalWrite(13, LOW)!
           Sets	
  pin	
  13	
  to	
  voltage	
  
           that	
  means	
  “off”	
  



                             Digital	
  I/O	
  Func`ons:	
  
                              	
  pinMode	
  
                              	
  digitalWrite	
  
                              	
  digitalRead	
  
15	
  
Basic	
  Programming	
  
•  The	
  pinMode()	
  func`on	
  configures	
  a	
  pin	
  as	
  
   either	
  an	
  input	
  or	
  an	
  output.	
  To	
  use	
  it:	
  
   –  You	
  pass	
  it	
  the	
  number	
  of	
  the	
  pin	
  to	
  configure	
  
      and	
  the	
  constant	
  INPUT	
  or	
  OUTPUT.	
  	
  
       •  pinMode(11,	
  INPUT);	
  
       •  pinMode(13,	
  OUTPUT);	
  	
  
   –  When	
  configured	
  as	
  an	
  input,	
  a	
  pin	
  can	
  detect	
  the	
  
      state	
  of	
  a	
  sensor	
  like	
  a	
  pushbujon.	
  	
  
   –  As	
  an	
  output,	
  it	
  can	
  drive	
  an	
  actuator	
  like	
  an	
  LED.	
  	
  
Basic	
  Programming	
  
•  The	
  digitalWrite()	
  func`ons	
  outputs	
  a	
  value	
  
   on	
  a	
  pin	
  (0	
  –	
  19).	
  	
  
•  Possible	
  values	
  are:	
  
    –  LOW	
  (0	
  V)	
  	
  
    –  HIGH	
  (5	
  V)	
  
•  For	
  example:	
  	
  
    –  digitalWrite(13,	
  HIGH);	
  	
  
    –  digitalWrite(11,	
  LOW);	
  	
  
    	
  
Basic	
  Programming	
  
•  The	
  digitalRead()	
  func`on	
  reads	
  a	
  value	
  on	
  a	
  
   pin	
  (0	
  –	
  19).	
  	
  
•  Possible	
  values	
  are:	
  
    –  LOW	
  (0	
  V)	
  
    –  HIGH	
  (5	
  V)	
  
•  For	
  example:	
  	
  
    –  Int	
  x	
  =	
  digitalRead(13);	
  	
  
    –  Boolean	
  value	
  =	
  digitalRead(11);	
  	
  
    	
  
Basic	
  Programming	
  
•  The	
  analogWrite()	
  func`ons	
  outputs	
  a	
  PWM	
  
   value	
  on	
  a	
  pin	
  (3,5,6,9,10,11).	
  	
  
•  Possible	
  values	
  are:	
  
    –  0	
  (0	
  V)	
  
    –  127	
  (2,5	
  V)	
  
    –  255	
  (5	
  V)	
  
•  For	
  example:	
  	
  
    –  analogWrite(3,	
  0);	
  	
  
    –  analogWrite(11,	
  200);	
  	
  
    	
  
Basic	
  Programming	
  
•  The	
  analogRead()	
  func`ons	
  reads	
  analog	
  
   value	
  on	
  a	
  pin	
  (A0	
  –	
  A5).	
  	
  
•  Possible	
  values	
  are:	
  
    –  0	
  (0	
  V)	
  	
  
    –  512	
  (2,5	
  V)	
  
    –  1024	
  (5	
  V)	
  
•  For	
  example:	
  	
  
    –  Int	
  value	
  =	
  analogRead(0);	
  	
  
    –  Int	
  valueSensor	
  =	
  analogRead(5);	
  	
  
    	
  
Glossary of Arduino Programming
                        Terms	

Variable	
  Types:	
  


          int	

         Pos (32767) or neg (-32768) - 2 Bytes	

          long	

        Pos (2,147,483,647) or neg (-2,147,483,648) - 4B	

          float	

        Floating point math (0,0000001) – 4B	

          char	

        Character values: a , b , D , 1 – 1B	

          boolean	

     True or false values – 1 bit	





  21
Loops	

• Loops allow code to be repeated	

        –  Repeated code goes in a block, surrounded by { }	

        –  for loops	

           •  need a counter	

        –  while loops	

               need an escape	

        int •  i;                  // declare counter!
        !
        for ( i=0; i<=12; i++ ) { // standard structure!
        !
           Serial.println(i); // send value of i to serial monitor!
        !
        }!

22
Loops	

                        Ini`al	
  value	
  of	
  counter	
  
                        i=0	
  only	
  on	
  first	
  pass	
  through	
  the	
  loop	
  
                            Stopping	
  test:	
  	
  Con`nue	
  while	
  this	
  
                            condi`on	
  is	
  true	
  

        int i;                     // declare counter!
        !
        for ( i=0; i<=12; i++ ) { // standard structure!
        !
           Serial.println(i); // send value of i to serial monitor!
        !
        }!

                                   Increment:	
  	
  How	
  to	
  change	
  i	
  on	
  each	
  
                                   pass	
  through	
  the	
  loop	
  
23
Loops	

        Common	
  loop:	
  increment	
  by	
  one	
  
            for ( i=0; i<=12; i++ ) { //                increment by one!
               ... code block goes here!
            }!

        Common	
  loop:	
  increment	
  by	
  two	
  
            for ( i=0; i<=12; i+=2 ) { //                increment by two!
               ... code block goes here!
            }!

        Decrement	
  by	
  one	
  
            for ( i=12; i>=0; i-- ) { //                decrement by one!
               ... code block goes here!
            }!


24
Input	
  Bujon	
  
Pin	
  2	
  
	

void setup() 	

{ 	

      	

pinMode(13, OUTPUT);         	

      	

// declare LED as output 	

      	

pinMode(2, INPUT); 	

       	

      	

// declare switch as input 	

} 	

	

void loop() 	

{ 	

      	

if (digitalRead(2) == HIGH) 	

       	

// check if input is HIGH 	

      	

{ 	

               digitalWrite(13, HIGH);	

// turns the LED on 	

               delay(1000); 	

   	

 	

      	

// pause for 1 second 	

               digitalWrite(13, LOW); 	

// turns the LED off 	

               delay(1000); 	

   	

 	

      	

// pause for 1 second 	

      	

} 	

}
hjp://processing.org/	
  
                            Now	
  connect	
  with	
  Processing...	
  

       hjp://io.workspace.howest.be/Workshop/MM.zip	
  

Ref:	
  GeJng	
  Started	
  with	
  Processing	
  –	
  Casey	
  Reas	
  &	
  Ben	
  Fry	
  (O’REILLY	
  –	
  2010)	
  
What	
  is	
  Processing	
  ?	
  
	
  
	
  
       Create	
  images,	
  anima`ons	
  and	
  interac`ons	
  
                              through	
  
                          	
  “sketching”
                            with	
  code	
  
What	
  is	
  Processing	
  ?	
  

	
  
Software
Prototyping_
What	
  is	
  Processing	
  ?	
  
Family	
  Tree	
  
Assignment	
  for	
  today...	
  

          DESIGN	
  YOUR	
  
          ENTERTAINMENT	
  SYSTEM	
  
Example	
  running	
  zelda	
  
Example	
  Kirby’s	
  flying	
  adventure	
  
Example	
  threadmill	
  supermario	
  
Example	
  Smoking	
  IR-­‐Gun	
  
Principle	
  for	
  game	
  interface	
  
                                                     Sensors	
  

                                      READ	
  
         Your	
  
        Sketch	
  
          [C]	
  
                                inputs	
  
       UPLOAD	
  
                      ARDUINO	
      ATmega328	
  
    COMMUNICATE	
  
                               outputs	
  
                                                     Actuators	
  



                                     WRITE	
  
Principle	
  for	
  game	
  interface	
  
                                                               Sensors	
  

                                                READ	
  
        Bujon_	
  
       communi-­‐
       ca`on.pde	
  
                                          inputs	
  
       UPLOAD	
  
                               ARDUINO	
       ATmega328	
  
    COMMUNICATE	
  
                                         outputs	
  




                                        Nintendo	
  NES	
  
                       Processing	
  
                                         (emulator)	
  
Bujon_communica`on.pde	
  
•    hjp://www.arduino.cc/en/Tutorial/Bujon	
  

            void setup() {	

                 	

Serial.begin(9600);	

                 	

pinMode(ledPin, OUTPUT); 	

                 	

pinMode(buttonPin, INPUT); 	

            }	

            	

            void loop(){	

                 	

buttonState = digitalRead(buttonPin);	

            	

                 	

if (buttonState == HIGH) { 	

                 	

      	

Serial.print(‘LEFT', BYTE);	

                 	

      	

digitalWrite(ledPin, HIGH); 	

                 	

} 	

                 	

else {	

                 	

      	

Serial.print(‘RIGHT', BYTE);	

                 	

      	

digitalWrite(ledPin, LOW); 	

                 	

 }	

                 	

delay(15);	

            }
Processing	
  Code	
  
•  basic_example_vNESp5_arduino.pde	
  
Resources	
  	
  
•      hjp://www.arduino.cc/	
  
•      hjp://processing.org/	
  
•      hjp://mcanet.info/vNESp5/	
  
•      hjp://io.workspace.howest.be/Workshop/MM.zip	
  

	
  

Weitere ähnliche Inhalte

Was ist angesagt?

Arduino Day 1 Presentation
Arduino Day 1 PresentationArduino Day 1 Presentation
Arduino Day 1 PresentationYogendra Tamang
 
Cassiopeia Ltd - standard Arduino workshop
Cassiopeia Ltd - standard Arduino workshopCassiopeia Ltd - standard Arduino workshop
Cassiopeia Ltd - standard Arduino workshoptomtobback
 
Arduino اردوينو
Arduino اردوينوArduino اردوينو
Arduino اردوينوsalih mahmod
 
Arduino cic3
Arduino cic3Arduino cic3
Arduino cic3Jeni Shah
 
Mao arduino
Mao arduinoMao arduino
Mao arduinoMao Wu
 
Arduino: Analog I/O
Arduino: Analog I/OArduino: Analog I/O
Arduino: Analog I/OJune-Hao Hou
 
Introduction to the Arduino
Introduction to the ArduinoIntroduction to the Arduino
Introduction to the ArduinoWingston
 
DSL Junior Makers - electronics workshop
DSL Junior Makers - electronics workshopDSL Junior Makers - electronics workshop
DSL Junior Makers - electronics workshoptomtobback
 
Arduino slides
Arduino slidesArduino slides
Arduino slidessdcharle
 
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 channelstomtobback
 
Physical prototyping lab1-input_output (2)
Physical prototyping lab1-input_output (2)Physical prototyping lab1-input_output (2)
Physical prototyping lab1-input_output (2)Tony Olsson.
 
Intro to Arduino Revision #2
Intro to Arduino Revision #2Intro to Arduino Revision #2
Intro to Arduino Revision #2Qtechknow
 
Arduino Foundations
Arduino FoundationsArduino Foundations
Arduino FoundationsJohn Breslin
 
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 programmingThe IOT Academy
 
LED Cube Presentation Slides
LED Cube Presentation Slides LED Cube Presentation Slides
LED Cube Presentation Slides Projects EC
 

Was ist angesagt? (20)

Arduino Day 1 Presentation
Arduino Day 1 PresentationArduino Day 1 Presentation
Arduino Day 1 Presentation
 
Cassiopeia Ltd - standard Arduino workshop
Cassiopeia Ltd - standard Arduino workshopCassiopeia Ltd - standard Arduino workshop
Cassiopeia Ltd - standard Arduino workshop
 
Arduino
ArduinoArduino
Arduino
 
Arduino Workshop Day 2
Arduino  Workshop Day 2Arduino  Workshop Day 2
Arduino Workshop Day 2
 
Arduino اردوينو
Arduino اردوينوArduino اردوينو
Arduino اردوينو
 
Arduino cic3
Arduino cic3Arduino cic3
Arduino cic3
 
Mao arduino
Mao arduinoMao arduino
Mao arduino
 
Arduino: Analog I/O
Arduino: Analog I/OArduino: Analog I/O
Arduino: Analog I/O
 
Introduction to the Arduino
Introduction to the ArduinoIntroduction to the Arduino
Introduction to the Arduino
 
DSL Junior Makers - electronics workshop
DSL Junior Makers - electronics workshopDSL Junior Makers - electronics workshop
DSL Junior Makers - electronics workshop
 
Arduino slides
Arduino slidesArduino slides
Arduino slides
 
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
 
Physical prototyping lab1-input_output (2)
Physical prototyping lab1-input_output (2)Physical prototyping lab1-input_output (2)
Physical prototyping lab1-input_output (2)
 
Intro to Arduino Revision #2
Intro to Arduino Revision #2Intro to Arduino Revision #2
Intro to Arduino Revision #2
 
Arduino Foundations
Arduino FoundationsArduino Foundations
Arduino Foundations
 
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
 
Simply arduino
Simply arduinoSimply arduino
Simply arduino
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
LED Cube Presentation Slides
LED Cube Presentation Slides LED Cube Presentation Slides
LED Cube Presentation Slides
 

Andere mochten auch

Makeymakey
MakeymakeyMakeymakey
Makeymakeyhwhitt
 
Bloxels vs makey makey
Bloxels vs makey makeyBloxels vs makey makey
Bloxels vs makey makeyYoussef Moussa
 
Introducing Engineering in Elementary Classroom
Introducing Engineering in Elementary ClassroomIntroducing Engineering in Elementary Classroom
Introducing Engineering in Elementary ClassroomGennafer Barajas
 
Makey makey
Makey makeyMakey makey
Makey makey凱 邱
 
Instructions for Scratch Pong Game Adaptation to use with MaKey MaKey
Instructions for Scratch Pong Game Adaptation to use with MaKey MaKeyInstructions for Scratch Pong Game Adaptation to use with MaKey MaKey
Instructions for Scratch Pong Game Adaptation to use with MaKey MaKeyRenee Neumeier
 
Taller makey makey + scracth + wedo (1)
Taller makey makey + scracth + wedo (1)Taller makey makey + scracth + wedo (1)
Taller makey makey + scracth + wedo (1)baixcost
 
Circuits with Makey Makey
Circuits with Makey MakeyCircuits with Makey Makey
Circuits with Makey Makeymacleanpublic
 
Y5-6 Forces and Electricity Teaching Ideas J Villis
Y5-6 Forces and Electricity Teaching Ideas J VillisY5-6 Forces and Electricity Teaching Ideas J Villis
Y5-6 Forces and Electricity Teaching Ideas J VillisJoanne Villis
 
Makey bluetooth2
Makey  bluetooth2Makey  bluetooth2
Makey bluetooth2baixcost
 
Challenge Based Learning in Makerspaces: How to Use Design to Develop Creativity
Challenge Based Learning in Makerspaces: How to Use Design to Develop CreativityChallenge Based Learning in Makerspaces: How to Use Design to Develop Creativity
Challenge Based Learning in Makerspaces: How to Use Design to Develop CreativityDiana Rendina
 

Andere mochten auch (20)

Makeymakey
MakeymakeyMakeymakey
Makeymakey
 
Makey Makey NYSCATE 2014
Makey Makey NYSCATE 2014Makey Makey NYSCATE 2014
Makey Makey NYSCATE 2014
 
Makey makey
Makey makeyMakey makey
Makey makey
 
Bloxels vs makey makey
Bloxels vs makey makeyBloxels vs makey makey
Bloxels vs makey makey
 
Makey Makey
Makey MakeyMakey Makey
Makey Makey
 
Makey makey
Makey makeyMakey makey
Makey makey
 
Makey Makey NYSCATE 2014
Makey Makey NYSCATE 2014Makey Makey NYSCATE 2014
Makey Makey NYSCATE 2014
 
Introducing Engineering in Elementary Classroom
Introducing Engineering in Elementary ClassroomIntroducing Engineering in Elementary Classroom
Introducing Engineering in Elementary Classroom
 
Makey makey x les
Makey makey x lesMakey makey x les
Makey makey x les
 
Scratch day
Scratch dayScratch day
Scratch day
 
Kom igång med Makey Makey
Kom igång med Makey MakeyKom igång med Makey Makey
Kom igång med Makey Makey
 
Makey makey
Makey makeyMakey makey
Makey makey
 
Instructions for Scratch Pong Game Adaptation to use with MaKey MaKey
Instructions for Scratch Pong Game Adaptation to use with MaKey MaKeyInstructions for Scratch Pong Game Adaptation to use with MaKey MaKey
Instructions for Scratch Pong Game Adaptation to use with MaKey MaKey
 
Taller makey makey + scracth + wedo (1)
Taller makey makey + scracth + wedo (1)Taller makey makey + scracth + wedo (1)
Taller makey makey + scracth + wedo (1)
 
Circuits with Makey Makey
Circuits with Makey MakeyCircuits with Makey Makey
Circuits with Makey Makey
 
Makey makey
Makey makeyMakey makey
Makey makey
 
Y5-6 Forces and Electricity Teaching Ideas J Villis
Y5-6 Forces and Electricity Teaching Ideas J VillisY5-6 Forces and Electricity Teaching Ideas J Villis
Y5-6 Forces and Electricity Teaching Ideas J Villis
 
Makey bluetooth2
Makey  bluetooth2Makey  bluetooth2
Makey bluetooth2
 
Challenge Based Learning in Makerspaces: How to Use Design to Develop Creativity
Challenge Based Learning in Makerspaces: How to Use Design to Develop CreativityChallenge Based Learning in Makerspaces: How to Use Design to Develop Creativity
Challenge Based Learning in Makerspaces: How to Use Design to Develop Creativity
 
Spelen met STEM
Spelen met STEMSpelen met STEM
Spelen met STEM
 

Ähnlich wie Programming arduino makeymakey

Ähnlich wie Programming arduino makeymakey (20)

Arduino Programming Basic
Arduino Programming BasicArduino Programming Basic
Arduino Programming Basic
 
arduino.ppt
arduino.pptarduino.ppt
arduino.ppt
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Arduino intro.pptx
Arduino intro.pptxArduino intro.pptx
Arduino intro.pptx
 
Arduino Workshop (3).pptx
Arduino Workshop (3).pptxArduino Workshop (3).pptx
Arduino Workshop (3).pptx
 
Day1
Day1Day1
Day1
 
Introduction to Arduino Microcontroller
Introduction to Arduino MicrocontrollerIntroduction to Arduino Microcontroller
Introduction to Arduino Microcontroller
 
arduinoSimon.ppt
arduinoSimon.pptarduinoSimon.ppt
arduinoSimon.ppt
 
arduinoSimon.ppt
arduinoSimon.pptarduinoSimon.ppt
arduinoSimon.ppt
 
arduinoSimon.ppt
arduinoSimon.pptarduinoSimon.ppt
arduinoSimon.ppt
 
Arduino workshop
Arduino workshopArduino workshop
Arduino workshop
 
Basics of arduino uno
Basics of arduino unoBasics of arduino uno
Basics of arduino uno
 
IOTC08 The Arduino Platform
IOTC08 The Arduino PlatformIOTC08 The Arduino Platform
IOTC08 The Arduino Platform
 
Arduino Programming Familiarization
Arduino Programming FamiliarizationArduino Programming Familiarization
Arduino Programming Familiarization
 
How to use an Arduino
How to use an ArduinoHow to use an Arduino
How to use an Arduino
 
Arduino: Intro and Digital I/O
Arduino: Intro and Digital I/OArduino: Intro and Digital I/O
Arduino: Intro and Digital I/O
 
01_DIGITAL IO.pptx
01_DIGITAL IO.pptx01_DIGITAL IO.pptx
01_DIGITAL IO.pptx
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
Fun with arduino
Fun with arduinoFun with arduino
Fun with arduino
 
Microcontroller_basics_lesson1_2019 (1).pptx
Microcontroller_basics_lesson1_2019 (1).pptxMicrocontroller_basics_lesson1_2019 (1).pptx
Microcontroller_basics_lesson1_2019 (1).pptx
 

Mehr von Industrial Design Center

Tiii presentation by dr. ir S.A.G. Stephan Wensveen
Tiii presentation by dr. ir S.A.G. Stephan WensveenTiii presentation by dr. ir S.A.G. Stephan Wensveen
Tiii presentation by dr. ir S.A.G. Stephan WensveenIndustrial Design Center
 
TIII team: Presentation final event [KULeuven]
TIII team: Presentation final event [KULeuven]TIII team: Presentation final event [KULeuven]
TIII team: Presentation final event [KULeuven]Industrial Design Center
 
Softkinetic user interface evolution by Ilse Ravyse and Tanya Varbanove
Softkinetic user interface evolution by Ilse Ravyse and Tanya VarbanoveSoftkinetic user interface evolution by Ilse Ravyse and Tanya Varbanove
Softkinetic user interface evolution by Ilse Ravyse and Tanya VarbanoveIndustrial Design Center
 
TIII presentation by Jelle Saldien and Jolien De Ville
TIII presentation by Jelle Saldien and Jolien De VilleTIII presentation by Jelle Saldien and Jolien De Ville
TIII presentation by Jelle Saldien and Jolien De VilleIndustrial Design Center
 
Smart textiles talk by Lieva Van langenhove
Smart textiles talk by Lieva Van langenhoveSmart textiles talk by Lieva Van langenhove
Smart textiles talk by Lieva Van langenhoveIndustrial Design Center
 

Mehr von Industrial Design Center (20)

Whist TIII presentation
Whist TIII presentationWhist TIII presentation
Whist TIII presentation
 
Tiii presentation by dr. ir S.A.G. Stephan Wensveen
Tiii presentation by dr. ir S.A.G. Stephan WensveenTiii presentation by dr. ir S.A.G. Stephan Wensveen
Tiii presentation by dr. ir S.A.G. Stephan Wensveen
 
Presentation pitch projects
Presentation pitch projectsPresentation pitch projects
Presentation pitch projects
 
TIII team: Presentation final event [CUO]
TIII team: Presentation final event [CUO]TIII team: Presentation final event [CUO]
TIII team: Presentation final event [CUO]
 
TIII team: Presentation final event [KULeuven]
TIII team: Presentation final event [KULeuven]TIII team: Presentation final event [KULeuven]
TIII team: Presentation final event [KULeuven]
 
TIII team: Presentation final event
TIII team: Presentation final eventTIII team: Presentation final event
TIII team: Presentation final event
 
Smart textiles
Smart textilesSmart textiles
Smart textiles
 
Sirris presentation
Sirris presentationSirris presentation
Sirris presentation
 
Softkinetic user interface evolution by Ilse Ravyse and Tanya Varbanove
Softkinetic user interface evolution by Ilse Ravyse and Tanya VarbanoveSoftkinetic user interface evolution by Ilse Ravyse and Tanya Varbanove
Softkinetic user interface evolution by Ilse Ravyse and Tanya Varbanove
 
3 d scanning howest summer classes 2012
3 d scanning   howest summer classes 20123 d scanning   howest summer classes 2012
3 d scanning howest summer classes 2012
 
3 d scanning howest summer classes 2012
3 d scanning   howest summer classes 20123 d scanning   howest summer classes 2012
3 d scanning howest summer classes 2012
 
Product photography summer school
Product photography   summer schoolProduct photography   summer school
Product photography summer school
 
Illumination in new ways jacob rader
Illumination in new ways   jacob raderIllumination in new ways   jacob rader
Illumination in new ways jacob rader
 
TIII presentation by Jelle Saldien and Jolien De Ville
TIII presentation by Jelle Saldien and Jolien De VilleTIII presentation by Jelle Saldien and Jolien De Ville
TIII presentation by Jelle Saldien and Jolien De Ville
 
Smart textiles talk by Lieva Van langenhove
Smart textiles talk by Lieva Van langenhoveSmart textiles talk by Lieva Van langenhove
Smart textiles talk by Lieva Van langenhove
 
Arduino talk by Toon Nelissen
Arduino talk by Toon Nelissen Arduino talk by Toon Nelissen
Arduino talk by Toon Nelissen
 
Briefing workshop laser cutting eng 2012
Briefing workshop laser cutting eng 2012Briefing workshop laser cutting eng 2012
Briefing workshop laser cutting eng 2012
 
Workshop diy 3 d printing makerbots 2012
Workshop diy 3 d printing   makerbots 2012Workshop diy 3 d printing   makerbots 2012
Workshop diy 3 d printing makerbots 2012
 
Prototyping with silicone
Prototyping with siliconePrototyping with silicone
Prototyping with silicone
 
Lékué history
Lékué historyLékué history
Lékué history
 

Kürzlich hochgeladen

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
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
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
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
 
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
 
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
 
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
 

Kürzlich hochgeladen (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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
 
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...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 

Programming arduino makeymakey

  • 1. Workshop  Makey  Makey   (Arduino)   Jelle.saldien@howest.be  
  • 3. Principle   Sensors   READ   Your   Sketch   [C]   inputs   UPLOAD   ARDUINO   ATmega328   COMMUNICATE   outputs   Actuators   WRITE  
  • 8. Arduino  Board   Microcontroller ATmega328   Opera-ng  Voltage 5  V   Input  Voltage  (recommended) 7-­‐12  V   Input  Voltage  (limits) 6-­‐20  V   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 32  KB  (ATmega328)  of  which  2  KB  used  by   Flash  Memory bootloader   SRAM 2  KB  (ATmega328) EEPROM 1  KB  (ATmega328) Clock  Speed 16  MHz
  • 9. Arduino  IDE   •  IDE:   –  Integrated   –  Development   –  Environment  
  • 10. Code  Structure:  setup  func`on   setup  func`on  is  executed   only  once  at  the  start   10  
  • 11. Code  Structure:  loop  func`on   loop  func`on  is   repeated  indefinitely   11  
  • 12. Code   pinMode(13, Output)! prepare  pin  13  for   outputs  of  voltage   Digital  I/O  Func`ons:   pinMode   digitalWrite   digitalRead   12  
  • 13. Code   digitalWrite(13, HIGH)! Sets  pin  13  to  a  voltage  that   means  “on”   Digital  I/O  Func`ons:    pinMode    digitalWrite    digitalRead   13  
  • 14. Code   delay(1000);! Tells  microcontroller  to  do   nothing  for  1000  ms  =  1  s   Digital  I/O  Func`ons:    pinMode    digitalWrite    digitalRead   14  
  • 15. Code   digitalWrite(13, LOW)! Sets  pin  13  to  voltage   that  means  “off”   Digital  I/O  Func`ons:    pinMode    digitalWrite    digitalRead   15  
  • 16. Basic  Programming   •  The  pinMode()  func`on  configures  a  pin  as   either  an  input  or  an  output.  To  use  it:   –  You  pass  it  the  number  of  the  pin  to  configure   and  the  constant  INPUT  or  OUTPUT.     •  pinMode(11,  INPUT);   •  pinMode(13,  OUTPUT);     –  When  configured  as  an  input,  a  pin  can  detect  the   state  of  a  sensor  like  a  pushbujon.     –  As  an  output,  it  can  drive  an  actuator  like  an  LED.    
  • 17. Basic  Programming   •  The  digitalWrite()  func`ons  outputs  a  value   on  a  pin  (0  –  19).     •  Possible  values  are:   –  LOW  (0  V)     –  HIGH  (5  V)   •  For  example:     –  digitalWrite(13,  HIGH);     –  digitalWrite(11,  LOW);      
  • 18. Basic  Programming   •  The  digitalRead()  func`on  reads  a  value  on  a   pin  (0  –  19).     •  Possible  values  are:   –  LOW  (0  V)   –  HIGH  (5  V)   •  For  example:     –  Int  x  =  digitalRead(13);     –  Boolean  value  =  digitalRead(11);      
  • 19. Basic  Programming   •  The  analogWrite()  func`ons  outputs  a  PWM   value  on  a  pin  (3,5,6,9,10,11).     •  Possible  values  are:   –  0  (0  V)   –  127  (2,5  V)   –  255  (5  V)   •  For  example:     –  analogWrite(3,  0);     –  analogWrite(11,  200);      
  • 20. Basic  Programming   •  The  analogRead()  func`ons  reads  analog   value  on  a  pin  (A0  –  A5).     •  Possible  values  are:   –  0  (0  V)     –  512  (2,5  V)   –  1024  (5  V)   •  For  example:     –  Int  value  =  analogRead(0);     –  Int  valueSensor  =  analogRead(5);      
  • 21. Glossary of Arduino Programming Terms Variable  Types:   int Pos (32767) or neg (-32768) - 2 Bytes long Pos (2,147,483,647) or neg (-2,147,483,648) - 4B float Floating point math (0,0000001) – 4B char Character values: a , b , D , 1 – 1B boolean True or false values – 1 bit 21
  • 22. Loops • Loops allow code to be repeated –  Repeated code goes in a block, surrounded by { } –  for loops •  need a counter –  while loops need an escape int •  i; // declare counter! ! for ( i=0; i<=12; i++ ) { // standard structure! ! Serial.println(i); // send value of i to serial monitor! ! }! 22
  • 23. Loops Ini`al  value  of  counter   i=0  only  on  first  pass  through  the  loop   Stopping  test:    Con`nue  while  this   condi`on  is  true   int i; // declare counter! ! for ( i=0; i<=12; i++ ) { // standard structure! ! Serial.println(i); // send value of i to serial monitor! ! }! Increment:    How  to  change  i  on  each   pass  through  the  loop   23
  • 24. Loops Common  loop:  increment  by  one   for ( i=0; i<=12; i++ ) { // increment by one! ... code block goes here! }! Common  loop:  increment  by  two   for ( i=0; i<=12; i+=2 ) { // increment by two! ... code block goes here! }! Decrement  by  one   for ( i=12; i>=0; i-- ) { // decrement by one! ... code block goes here! }! 24
  • 25. Input  Bujon   Pin  2   void setup() { pinMode(13, OUTPUT); // declare LED as output pinMode(2, INPUT); // declare switch as input } void loop() { if (digitalRead(2) == HIGH) // check if input is HIGH { digitalWrite(13, HIGH); // turns the LED on delay(1000); // pause for 1 second digitalWrite(13, LOW); // turns the LED off delay(1000); // pause for 1 second } }
  • 26. hjp://processing.org/   Now  connect  with  Processing...   hjp://io.workspace.howest.be/Workshop/MM.zip   Ref:  GeJng  Started  with  Processing  –  Casey  Reas  &  Ben  Fry  (O’REILLY  –  2010)  
  • 27. What  is  Processing  ?       Create  images,  anima`ons  and  interac`ons   through    “sketching” with  code  
  • 28. What  is  Processing  ?     Software Prototyping_
  • 31. Assignment  for  today...   DESIGN  YOUR   ENTERTAINMENT  SYSTEM  
  • 36. Principle  for  game  interface   Sensors   READ   Your   Sketch   [C]   inputs   UPLOAD   ARDUINO   ATmega328   COMMUNICATE   outputs   Actuators   WRITE  
  • 37. Principle  for  game  interface   Sensors   READ   Bujon_   communi-­‐ ca`on.pde   inputs   UPLOAD   ARDUINO   ATmega328   COMMUNICATE   outputs   Nintendo  NES   Processing   (emulator)  
  • 38. Bujon_communica`on.pde   •  hjp://www.arduino.cc/en/Tutorial/Bujon   void setup() { Serial.begin(9600); pinMode(ledPin, OUTPUT); pinMode(buttonPin, INPUT); } void loop(){ buttonState = digitalRead(buttonPin); if (buttonState == HIGH) { Serial.print(‘LEFT', BYTE); digitalWrite(ledPin, HIGH); } else { Serial.print(‘RIGHT', BYTE); digitalWrite(ledPin, LOW); } delay(15); }
  • 39. Processing  Code   •  basic_example_vNESp5_arduino.pde  
  • 40. Resources     •  hjp://www.arduino.cc/   •  hjp://processing.org/   •  hjp://mcanet.info/vNESp5/   •  hjp://io.workspace.howest.be/Workshop/MM.zip