SlideShare a Scribd company logo
table of contents:
microprocessor?
arduino?
example projects
composition
material
behavior
choreography
translator
urban agent
resources
output
input + output
what is a microchip? tiny, inexpensive, computer which can
interact with the physical world
feedback
sensors
microphone
infrared sensor
C02 sensor
compass
motor
LED
valve
speaker
actuators
μ chip
brain
=
programmed
behavior
0,86 €
what is a microchip?
hardware
“augmented” microchip
higher level
programming
+ +
very popular
(fora galore)
software community
what is an Arduino?
Arduino developement environement
BLINK
1. download arduino software (https://www.arduino.cc/en/Main/Software)
blink: software
2. plug in arduino to laptop with USB cable
5. select board > Arduino Genuino / UNO
3. run Arduino software
6. select COM Port > COMXX (windows) or dev/...Arduino Uno (Mac)
*Windows Device Driver install (Device Manager > Update Driver >
select Arduino/Drivers folder)
4. file > examples > basic > blink
syntax
functionName (argument 1, argument 2)
{
do something
between curly
brackets
}
semicolons for most line endings;
// comments after double slashes
/* comments
between
star slashes */
asked to choose a sketch folder name: this is where your Arduino sketch
will be stored. Name it Blinking_LED and click OK. Then, type the following
text (Example 01) into the Arduino sketch editor (the main window of
the Arduino IDE). You can also download it from www.makezine.com/
getstartedarduino. It should appear as shown in Figure 4-3.
// Example 01 : Blinking LED
#define LED 13 // LED connected to
// digital pin 13
void setup()
{
pinMode(LED, OUTPUT); // sets the digital
// pin as output
}
void loop()
{
digitalWrite(LED, HIGH); // turns the LED on
delay(1000); // waits for a second
digitalWrite(LED, LOW); // turns the LED off
delay(1000); // waits for a second
}
blink: software
comment
(for humans)
part of code
where we define
input/output pins
Required in every
Arduino sketch
main code which
will be repeated
over and over.
Required in every
Arduino sketch
do nothing for
1000 milliseconds
(one second)
do nothing for
1000 milliseconds
replace “LED”
with “13”
when compiled
set pin 13 to
OUTPUT
sets pin 13
to 5V
sets pin 13
to GND
*HIGH = 5V
LOW = 0V
language reference
blink: software uploading
Arduino Code Hex Code
compiling uploading
Microchip
Flash
memory
blink: hardware
analog in pins
microchip
digital in/out pins
power pins
USB
connector
reset
button
power
connector
discrete,
finite
smooth,
continuous
the real
world is
analog
microchips
are digital
analog vs digital
specialized pins
needs power (+)
can convert
analog to digital
can compare
voltages
Can talk to computers
has a clock
has reconfigurable
sensing and
actuating pins
can “interrupt”
itself
blink: hardware Arduino must be plugged in...
...to your computer,
in order to download
the code.
after being programmed:
(USB cable also supplies 5V)
can be battery powered
or plugged into wall
adapter (no longer needs
computer).
blink: the breadboard
power rails = horizontal
component
rails =
vertical
blink: hardware
physical object symbolic representation
blink: hardware
LED Polarity (the property of
having poles or being polar):
circuit symbol
Anode
Cathode
physical object
resistors do not have polarity
circuit symbol
physical object
sourcing vs sinking
upload blink (you may be asked to Save first) and the check console
blink: uploading!
blink: modifying software
change delay values...what happens?
Pulse Width Modulation (PWM)
microchips operate
faster than human
sensory apparatuses
human eyes can detect:
<60-90 Hz
human ears can detect:
20 - 20,000Hz
our microchip
runs at
16 MHz!!
blink: Thresholds of human perception
blink: modifying hardware
change LED for buzzer, what happens?
fade: modifying software
5V
0V
Time
Debugging Tips:
-the compile button
-display line numbers (File > Preferences)
-the serial monitor and serial printing (make sure same baud rate)
-isolate, test one thing at a time.
-metal connections are exposed on the bottom of
the board, beware of stray bits of metal or metal
tables.
-if your arduino is turning off right after turning
on, it’s probably shorting (ground and power are
connected).
diagnostic tools: mulitmeter & oscilloscope
measures voltage and current
at single location and time
multimeter oscilloscope
measures voltage and current
at multiple locations and times
BUTTON
button: hardware
// Example 03A: Turn on LED when the button is pressed
// and keep it on after it is released
#define LED 13 // the pin for the LED
#define BUTTON 7 // the input pin where the
// pushbutton is connected
int val = 0; // val will be used to store the state
// of the input pin
int state = 0; // 0 = LED off while 1 = LED on
void setup() {
pinMode(LED, OUTPUT); // tell Arduino LED is an output
pinMode(BUTTON, INPUT); // and BUTTON is an input
}
void loop() {
val = digitalRead(BUTTON); // read input value and store it
// check if the input is HIGH (button pressed)
// and change the state
if (val == HIGH) {
state = 1 - state;
}
if (state == 1) {
digitalWrite(LED, HIGH); // turn LED ON
} else {
digitalWrite(LED, LOW);
}
}
Now go test this code. You will notice that it works . . . somewhat. You’ll
declare an
INPUT too
if statement
checks a
condition and
executes the
proceeding
statement if the
condition is
“true”
*1 = TRUE
0 = FALSE
button: software
variable =
box for storage
hyperactive machine: debouncing
one button press = microscopic “bouncing” from the
								perspective of the microchip
introduce
multiple readings
taken at different
times to solve
the bouncing
probem
debounce: software
// Example 03B: Turn on LED when the button is pressed
// and keep it on after it is released
// Now with a new and improved formula!
#define LED 13 // the pin for the LED
#define BUTTON 7 // the input pin where the
// pushbutton is connected
int val = 0; // val will be used to store the state
// of the input pin
int old_val = 0; // this variable stores the previous
// value of "val"
int state = 0; // 0 = LED off and 1 = LED on
void setup() {
pinMode(LED, OUTPUT); // tell Arduino LED is an output
pinMode(BUTTON, INPUT); // and BUTTON is an input
}
void loop(){
val = digitalRead(BUTTON); // read input value and store it
// yum, fresh
// check if there was a transition
if ((val == HIGH) && (old_val == LOW)){
state = 1 - state;
}
old_val = val; // val is now old, let's store it
if (state == 1) {
digitalWrite(LED, HIGH); // turn LED ON
} else {
digitalWrite(LED, LOW);
}
}
stepper motors
servos
LCD display
potentiometer
humidity sensor
ultrasonic rangefinder
buttons
LEDs
temperature sensor
humidity sensor
our supplies today:
YOU DECIDE
stepper motors
potentiometers
humidity
IR rangefinder
LCD
temp
reuse existing code!
find code online and use it
if you’re a beginner, don’t bother
making anything from scratch just yet.
(The more popular the sensor/actuator
the easier this will be to find online)
Libraries
premade packages of software
procedures which save you time.
libraries provide extra
functionality for use in sketches,
e.g. working with hardware or
manipulating data.
1. Find thing you want to talk to
2. Find and download the library
3. Get experimenting!
eg. radio transmitter/reciever
Libraries
1. 3.
2. 4.
Libraries: installing
Try not to fry your Arduino yo
mosfet = electrically-controlled valve
mosfet = electrically-controlled valve
stepper motors
stepper motors
CD/DVD drives
CD/DVD drives
stepper motors
plotting machine foam cutting machine

More Related Content

PDF
Etapes fab-venti-v2
PDF
Arduino Workshop 2011.05.31
PPT
Physical prototyping lab2-analog_digital
PDF
Programming arduino makeymakey
PDF
Arduino: Analog I/O
DOCX
Arduino windows remote control
PPTX
Mims effect
PDF
برمجة الأردوينو - اليوم الأول
Etapes fab-venti-v2
Arduino Workshop 2011.05.31
Physical prototyping lab2-analog_digital
Programming arduino makeymakey
Arduino: Analog I/O
Arduino windows remote control
Mims effect
برمجة الأردوينو - اليوم الأول

What's hot (20)

PDF
publish manual
PDF
Embedded system course projects - Arduino Course
PPTX
Arduino cic3
PPT
Physical prototyping lab1-input_output (2)
PDF
Cassiopeia Ltd - standard Arduino workshop
PPTX
Introduction to Arduino
PPTX
Introduction to Arduino
PPTX
PDF
Logic gate tester for IC's ( Digital Electronics and Logic deisgn EE3114 )
PDF
Arduino workshop sensors
PDF
Arduino projects &amp; tutorials
DOCX
All about ir arduino - cool
PPTX
Buy arduino zero by robomart
PDF
How to measure frequency and duty cycle using arduino
PDF
Analog and Digital Electronics Lab Manual
PDF
Starting with Arduino
PPTX
Digital clock workshop
PDF
DSL Junior Makers - electronics workshop
PPTX
Arduino programming
PDF
Up and running with Teensy 3.1
publish manual
Embedded system course projects - Arduino Course
Arduino cic3
Physical prototyping lab1-input_output (2)
Cassiopeia Ltd - standard Arduino workshop
Introduction to Arduino
Introduction to Arduino
Logic gate tester for IC's ( Digital Electronics and Logic deisgn EE3114 )
Arduino workshop sensors
Arduino projects &amp; tutorials
All about ir arduino - cool
Buy arduino zero by robomart
How to measure frequency and duty cycle using arduino
Analog and Digital Electronics Lab Manual
Starting with Arduino
Digital clock workshop
DSL Junior Makers - electronics workshop
Arduino programming
Up and running with Teensy 3.1
Ad

Similar to Arduino workshop (20)

PPT
01 Intro to the Arduino and it's basics.ppt
PPTX
Microcontroller_basics_lesson1_2019 (1).pptx
PPTX
Arduino intro.pptx
PPT
arduinoSimon.ppt
PPT
arduinoSimon.ppt
PPT
arduinoSimon.ppt
PPTX
INTODUCTION OF IOT AND INTERFACING WITH ARDUINO UNO
PPT
arduino.ppt
PDF
Arduino-workshop.computer engineering.pdf
PPT
13223971.ppt
PDF
02 Sensors and Actuators Understand .pdf
PPTX
Arduino.pptx
PPTX
Arduino Workshop Slides
PPTX
Arduino slides
PPTX
Arduino Slides With Neopixels
PPT
arduino Simon power point presentation.ppt
PDF
Arduino comic v0004
PDF
Arduino Comic-Jody Culkin-2011
DOCX
Basic arduino sketch example
01 Intro to the Arduino and it's basics.ppt
Microcontroller_basics_lesson1_2019 (1).pptx
Arduino intro.pptx
arduinoSimon.ppt
arduinoSimon.ppt
arduinoSimon.ppt
INTODUCTION OF IOT AND INTERFACING WITH ARDUINO UNO
arduino.ppt
Arduino-workshop.computer engineering.pdf
13223971.ppt
02 Sensors and Actuators Understand .pdf
Arduino.pptx
Arduino Workshop Slides
Arduino slides
Arduino Slides With Neopixels
arduino Simon power point presentation.ppt
Arduino comic v0004
Arduino Comic-Jody Culkin-2011
Basic arduino sketch example
Ad

More from Jonah Marrs (8)

PDF
Sensors class
PDF
Arduino coding class part ii
PDF
Arduino coding class
PDF
Arduino creative coding class part iii
PDF
Assembly class
PDF
Shop bot training
PDF
Microcontroller primer
PDF
Eagle pcb tutorial
Sensors class
Arduino coding class part ii
Arduino coding class
Arduino creative coding class part iii
Assembly class
Shop bot training
Microcontroller primer
Eagle pcb tutorial

Recently uploaded (20)

PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
additive manufacturing of ss316l using mig welding
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PDF
PPT on Performance Review to get promotions
PPTX
Geodesy 1.pptx...............................................
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
DOCX
573137875-Attendance-Management-System-original
PPT
Mechanical Engineering MATERIALS Selection
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
composite construction of structures.pdf
PPTX
Sustainable Sites - Green Building Construction
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
additive manufacturing of ss316l using mig welding
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
UNIT 4 Total Quality Management .pptx
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPT on Performance Review to get promotions
Geodesy 1.pptx...............................................
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
573137875-Attendance-Management-System-original
Mechanical Engineering MATERIALS Selection
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Internet of Things (IOT) - A guide to understanding
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
composite construction of structures.pdf
Sustainable Sites - Green Building Construction
Model Code of Practice - Construction Work - 21102022 .pdf

Arduino workshop

  • 1. table of contents: microprocessor? arduino? example projects composition material behavior choreography translator urban agent resources output input + output
  • 2. what is a microchip? tiny, inexpensive, computer which can interact with the physical world feedback sensors microphone infrared sensor C02 sensor compass motor LED valve speaker actuators μ chip brain = programmed behavior
  • 3. 0,86 € what is a microchip?
  • 4. hardware “augmented” microchip higher level programming + + very popular (fora galore) software community what is an Arduino?
  • 7. 1. download arduino software (https://www.arduino.cc/en/Main/Software) blink: software 2. plug in arduino to laptop with USB cable 5. select board > Arduino Genuino / UNO 3. run Arduino software 6. select COM Port > COMXX (windows) or dev/...Arduino Uno (Mac) *Windows Device Driver install (Device Manager > Update Driver > select Arduino/Drivers folder) 4. file > examples > basic > blink
  • 8. syntax functionName (argument 1, argument 2) { do something between curly brackets } semicolons for most line endings; // comments after double slashes /* comments between star slashes */
  • 9. asked to choose a sketch folder name: this is where your Arduino sketch will be stored. Name it Blinking_LED and click OK. Then, type the following text (Example 01) into the Arduino sketch editor (the main window of the Arduino IDE). You can also download it from www.makezine.com/ getstartedarduino. It should appear as shown in Figure 4-3. // Example 01 : Blinking LED #define LED 13 // LED connected to // digital pin 13 void setup() { pinMode(LED, OUTPUT); // sets the digital // pin as output } void loop() { digitalWrite(LED, HIGH); // turns the LED on delay(1000); // waits for a second digitalWrite(LED, LOW); // turns the LED off delay(1000); // waits for a second } blink: software comment (for humans) part of code where we define input/output pins Required in every Arduino sketch main code which will be repeated over and over. Required in every Arduino sketch do nothing for 1000 milliseconds (one second) do nothing for 1000 milliseconds replace “LED” with “13” when compiled set pin 13 to OUTPUT sets pin 13 to 5V sets pin 13 to GND *HIGH = 5V LOW = 0V
  • 11. blink: software uploading Arduino Code Hex Code compiling uploading Microchip Flash memory
  • 12. blink: hardware analog in pins microchip digital in/out pins power pins USB connector reset button power connector
  • 14. specialized pins needs power (+) can convert analog to digital can compare voltages Can talk to computers has a clock has reconfigurable sensing and actuating pins can “interrupt” itself
  • 15. blink: hardware Arduino must be plugged in... ...to your computer, in order to download the code. after being programmed: (USB cable also supplies 5V) can be battery powered or plugged into wall adapter (no longer needs computer).
  • 16. blink: the breadboard power rails = horizontal component rails = vertical
  • 17. blink: hardware physical object symbolic representation
  • 18. blink: hardware LED Polarity (the property of having poles or being polar): circuit symbol Anode Cathode physical object
  • 19. resistors do not have polarity circuit symbol physical object
  • 21. upload blink (you may be asked to Save first) and the check console blink: uploading!
  • 22. blink: modifying software change delay values...what happens? Pulse Width Modulation (PWM)
  • 23. microchips operate faster than human sensory apparatuses human eyes can detect: <60-90 Hz human ears can detect: 20 - 20,000Hz our microchip runs at 16 MHz!! blink: Thresholds of human perception
  • 24. blink: modifying hardware change LED for buzzer, what happens?
  • 26. Debugging Tips: -the compile button -display line numbers (File > Preferences) -the serial monitor and serial printing (make sure same baud rate) -isolate, test one thing at a time. -metal connections are exposed on the bottom of the board, beware of stray bits of metal or metal tables. -if your arduino is turning off right after turning on, it’s probably shorting (ground and power are connected).
  • 27. diagnostic tools: mulitmeter & oscilloscope measures voltage and current at single location and time multimeter oscilloscope measures voltage and current at multiple locations and times
  • 30. // Example 03A: Turn on LED when the button is pressed // and keep it on after it is released #define LED 13 // the pin for the LED #define BUTTON 7 // the input pin where the // pushbutton is connected int val = 0; // val will be used to store the state // of the input pin int state = 0; // 0 = LED off while 1 = LED on void setup() { pinMode(LED, OUTPUT); // tell Arduino LED is an output pinMode(BUTTON, INPUT); // and BUTTON is an input } void loop() { val = digitalRead(BUTTON); // read input value and store it // check if the input is HIGH (button pressed) // and change the state if (val == HIGH) { state = 1 - state; } if (state == 1) { digitalWrite(LED, HIGH); // turn LED ON } else { digitalWrite(LED, LOW); } } Now go test this code. You will notice that it works . . . somewhat. You’ll declare an INPUT too if statement checks a condition and executes the proceeding statement if the condition is “true” *1 = TRUE 0 = FALSE button: software variable = box for storage
  • 31. hyperactive machine: debouncing one button press = microscopic “bouncing” from the perspective of the microchip
  • 32. introduce multiple readings taken at different times to solve the bouncing probem debounce: software // Example 03B: Turn on LED when the button is pressed // and keep it on after it is released // Now with a new and improved formula! #define LED 13 // the pin for the LED #define BUTTON 7 // the input pin where the // pushbutton is connected int val = 0; // val will be used to store the state // of the input pin int old_val = 0; // this variable stores the previous // value of "val" int state = 0; // 0 = LED off and 1 = LED on void setup() { pinMode(LED, OUTPUT); // tell Arduino LED is an output pinMode(BUTTON, INPUT); // and BUTTON is an input } void loop(){ val = digitalRead(BUTTON); // read input value and store it // yum, fresh // check if there was a transition if ((val == HIGH) && (old_val == LOW)){ state = 1 - state; } old_val = val; // val is now old, let's store it if (state == 1) { digitalWrite(LED, HIGH); // turn LED ON } else { digitalWrite(LED, LOW); } }
  • 33. stepper motors servos LCD display potentiometer humidity sensor ultrasonic rangefinder buttons LEDs temperature sensor humidity sensor our supplies today:
  • 36. reuse existing code! find code online and use it if you’re a beginner, don’t bother making anything from scratch just yet. (The more popular the sensor/actuator the easier this will be to find online)
  • 37. Libraries premade packages of software procedures which save you time. libraries provide extra functionality for use in sketches, e.g. working with hardware or manipulating data.
  • 38. 1. Find thing you want to talk to 2. Find and download the library 3. Get experimenting! eg. radio transmitter/reciever Libraries
  • 40. Try not to fry your Arduino yo
  • 47. stepper motors plotting machine foam cutting machine