SlideShare a Scribd company logo
1 of 47
Download to read offline
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

What's hot

Embedded system course projects - Arduino Course
Embedded system course projects - Arduino CourseEmbedded system course projects - Arduino Course
Embedded system course projects - Arduino CourseElaf A.Saeed
 
Arduino cic3
Arduino cic3Arduino cic3
Arduino cic3Jeni Shah
 
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.
 
Cassiopeia Ltd - standard Arduino workshop
Cassiopeia Ltd - standard Arduino workshopCassiopeia Ltd - standard Arduino workshop
Cassiopeia Ltd - standard Arduino workshoptomtobback
 
Logic gate tester for IC's ( Digital Electronics and Logic deisgn EE3114 )
Logic gate tester for IC's ( Digital Electronics and Logic deisgn EE3114 )Logic gate tester for IC's ( Digital Electronics and Logic deisgn EE3114 )
Logic gate tester for IC's ( Digital Electronics and Logic deisgn EE3114 )Jikrul Sayeed
 
Arduino projects &amp; tutorials
Arduino projects &amp; tutorialsArduino projects &amp; tutorials
Arduino projects &amp; tutorialsAnshu Pandey
 
All about ir arduino - cool
All about ir   arduino - coolAll about ir   arduino - cool
All about ir arduino - coolVlada Stoja
 
Buy arduino zero by robomart
Buy arduino zero by robomartBuy arduino zero by robomart
Buy arduino zero by robomartchauhan786
 
How to measure frequency and duty cycle using arduino
How to measure frequency and duty cycle using  arduinoHow to measure frequency and duty cycle using  arduino
How to measure frequency and duty cycle using arduinoSagar Srivastav
 
Analog and Digital Electronics Lab Manual
Analog and Digital Electronics Lab ManualAnalog and Digital Electronics Lab Manual
Analog and Digital Electronics Lab ManualChirag Shetty
 
Starting with Arduino
Starting with Arduino Starting with Arduino
Starting with Arduino MajdyShamasneh
 
Digital clock workshop
Digital clock workshopDigital clock workshop
Digital clock workshopKedarv
 
DSL Junior Makers - electronics workshop
DSL Junior Makers - electronics workshopDSL Junior Makers - electronics workshop
DSL Junior Makers - electronics workshoptomtobback
 
Up and running with Teensy 3.1
Up and running with Teensy 3.1Up and running with Teensy 3.1
Up and running with Teensy 3.1yoonghm
 

What's hot (20)

publish manual
publish manualpublish manual
publish manual
 
Embedded system course projects - Arduino Course
Embedded system course projects - Arduino CourseEmbedded system course projects - Arduino Course
Embedded system course projects - Arduino Course
 
Arduino cic3
Arduino cic3Arduino cic3
Arduino cic3
 
Physical prototyping lab1-input_output (2)
Physical prototyping lab1-input_output (2)Physical prototyping lab1-input_output (2)
Physical prototyping lab1-input_output (2)
 
Cassiopeia Ltd - standard Arduino workshop
Cassiopeia Ltd - standard Arduino workshopCassiopeia Ltd - standard Arduino workshop
Cassiopeia Ltd - standard Arduino workshop
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Day1
Day1Day1
Day1
 
Logic gate tester for IC's ( Digital Electronics and Logic deisgn EE3114 )
Logic gate tester for IC's ( Digital Electronics and Logic deisgn EE3114 )Logic gate tester for IC's ( Digital Electronics and Logic deisgn EE3114 )
Logic gate tester for IC's ( Digital Electronics and Logic deisgn EE3114 )
 
Arduino workshop sensors
Arduino workshop sensorsArduino workshop sensors
Arduino workshop sensors
 
Arduino projects &amp; tutorials
Arduino projects &amp; tutorialsArduino projects &amp; tutorials
Arduino projects &amp; tutorials
 
All about ir arduino - cool
All about ir   arduino - coolAll about ir   arduino - cool
All about ir arduino - cool
 
Buy arduino zero by robomart
Buy arduino zero by robomartBuy arduino zero by robomart
Buy arduino zero by robomart
 
How to measure frequency and duty cycle using arduino
How to measure frequency and duty cycle using  arduinoHow to measure frequency and duty cycle using  arduino
How to measure frequency and duty cycle using arduino
 
Analog and Digital Electronics Lab Manual
Analog and Digital Electronics Lab ManualAnalog and Digital Electronics Lab Manual
Analog and Digital Electronics Lab Manual
 
Starting with Arduino
Starting with Arduino Starting with Arduino
Starting with Arduino
 
Digital clock workshop
Digital clock workshopDigital clock workshop
Digital clock workshop
 
DSL Junior Makers - electronics workshop
DSL Junior Makers - electronics workshopDSL Junior Makers - electronics workshop
DSL Junior Makers - electronics workshop
 
Arduino programming
Arduino programmingArduino programming
Arduino programming
 
Up and running with Teensy 3.1
Up and running with Teensy 3.1Up and running with Teensy 3.1
Up and running with Teensy 3.1
 

Similar to Arduino workshop

Robotics Session day 1
Robotics Session day 1Robotics Session day 1
Robotics Session day 1Afzal Ahmad
 
IoT Basics with few Embedded System Connections for sensors
IoT Basics with few Embedded System Connections for sensorsIoT Basics with few Embedded System Connections for sensors
IoT Basics with few Embedded System Connections for sensorssaritasapkal
 
Arduino Workshop Slides
Arduino Workshop SlidesArduino Workshop Slides
Arduino Workshop Slidesmkarlin14
 
Arduino slides
Arduino slidesArduino slides
Arduino slidessdcharle
 
Arduino اردوينو
Arduino اردوينوArduino اردوينو
Arduino اردوينوsalih mahmod
 
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.pptSAURABHKUMAR892774
 
Electronz_Chapter_2.pptx
Electronz_Chapter_2.pptxElectronz_Chapter_2.pptx
Electronz_Chapter_2.pptxMokete5
 
Arduino Slides With Neopixels
Arduino Slides With NeopixelsArduino Slides With Neopixels
Arduino Slides With Neopixelssdcharle
 
Arduino_UNO _tutorial_For_Beginners.pptx
Arduino_UNO _tutorial_For_Beginners.pptxArduino_UNO _tutorial_For_Beginners.pptx
Arduino_UNO _tutorial_For_Beginners.pptxANIKDUTTA25
 
Arduino comic v0004
Arduino comic v0004Arduino comic v0004
Arduino comic v0004DO!MAKERS
 
Hello Arduino.
Hello Arduino.Hello Arduino.
Hello Arduino.mkontopo
 
Arduino electronics cookbook
Arduino electronics cookbookArduino electronics cookbook
Arduino electronics cookbookFelipe Belarmino
 
Arduino Workshop (3).pptx
Arduino Workshop (3).pptxArduino Workshop (3).pptx
Arduino Workshop (3).pptxHebaEng
 
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdf
4 IOT 18ISDE712  MODULE 4 IoT Physical Devices and End Point-Aurdino  Uno.pdf4 IOT 18ISDE712  MODULE 4 IoT Physical Devices and End Point-Aurdino  Uno.pdf
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdfJayanthi Kannan MK
 

Similar to Arduino workshop (20)

Arduino intro.pptx
Arduino intro.pptxArduino intro.pptx
Arduino intro.pptx
 
Arduino
ArduinoArduino
Arduino
 
Robotics Session day 1
Robotics Session day 1Robotics Session day 1
Robotics Session day 1
 
IoT Basics with few Embedded System Connections for sensors
IoT Basics with few Embedded System Connections for sensorsIoT Basics with few Embedded System Connections for sensors
IoT Basics with few Embedded System Connections for sensors
 
Arduino Workshop Slides
Arduino Workshop SlidesArduino Workshop Slides
Arduino Workshop Slides
 
Arduino slides
Arduino slidesArduino slides
Arduino slides
 
Arduino.pptx
Arduino.pptxArduino.pptx
Arduino.pptx
 
Arduino اردوينو
Arduino اردوينوArduino اردوينو
Arduino اردوينو
 
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
 
Electronz_Chapter_2.pptx
Electronz_Chapter_2.pptxElectronz_Chapter_2.pptx
Electronz_Chapter_2.pptx
 
Arduino Slides With Neopixels
Arduino Slides With NeopixelsArduino Slides With Neopixels
Arduino Slides With Neopixels
 
Arduino_UNO _tutorial_For_Beginners.pptx
Arduino_UNO _tutorial_For_Beginners.pptxArduino_UNO _tutorial_For_Beginners.pptx
Arduino_UNO _tutorial_For_Beginners.pptx
 
Arduino Comic-Jody Culkin-2011
Arduino Comic-Jody Culkin-2011Arduino Comic-Jody Culkin-2011
Arduino Comic-Jody Culkin-2011
 
Arduino comic v0004
Arduino comic v0004Arduino comic v0004
Arduino comic v0004
 
Hello Arduino.
Hello Arduino.Hello Arduino.
Hello Arduino.
 
Arduino electronics cookbook
Arduino electronics cookbookArduino electronics cookbook
Arduino electronics cookbook
 
Arduino Workshop (3).pptx
Arduino Workshop (3).pptxArduino Workshop (3).pptx
Arduino Workshop (3).pptx
 
How to use an Arduino
How to use an ArduinoHow to use an Arduino
How to use an Arduino
 
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdf
4 IOT 18ISDE712  MODULE 4 IoT Physical Devices and End Point-Aurdino  Uno.pdf4 IOT 18ISDE712  MODULE 4 IoT Physical Devices and End Point-Aurdino  Uno.pdf
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdf
 
Arduino Programming Basic
Arduino Programming BasicArduino Programming Basic
Arduino Programming Basic
 

More from Jonah Marrs

Arduino coding class part ii
Arduino coding class part iiArduino coding class part ii
Arduino coding class part iiJonah Marrs
 
Arduino coding class
Arduino coding classArduino coding class
Arduino coding classJonah Marrs
 
Arduino creative coding class part iii
Arduino creative coding class part iiiArduino creative coding class part iii
Arduino creative coding class part iiiJonah Marrs
 
Shop bot training
Shop bot trainingShop bot training
Shop bot trainingJonah Marrs
 
Microcontroller primer
Microcontroller primerMicrocontroller primer
Microcontroller primerJonah Marrs
 
Eagle pcb tutorial
Eagle pcb tutorialEagle pcb tutorial
Eagle pcb tutorialJonah Marrs
 

More from Jonah Marrs (8)

Sensors class
Sensors classSensors class
Sensors class
 
Arduino coding class part ii
Arduino coding class part iiArduino coding class part ii
Arduino coding class part ii
 
Arduino coding class
Arduino coding classArduino coding class
Arduino coding class
 
Arduino creative coding class part iii
Arduino creative coding class part iiiArduino creative coding class part iii
Arduino creative coding class part iii
 
Assembly class
Assembly classAssembly class
Assembly class
 
Shop bot training
Shop bot trainingShop bot training
Shop bot training
 
Microcontroller primer
Microcontroller primerMicrocontroller primer
Microcontroller primer
 
Eagle pcb tutorial
Eagle pcb tutorialEagle pcb tutorial
Eagle pcb tutorial
 

Recently uploaded

main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 

Recently uploaded (20)

main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 

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