SlideShare ist ein Scribd-Unternehmen logo
1 von 89
Downloaden Sie, um offline zu lesen
Arduino Boot Camp!
Not your usual basic Arduino workshop!
Hello! I am Mithi!
I graduated from BS Electronics and Communication
Engineering in UP Diliman sometime ago
I am also one of the co-founders
of Nanica.io, a young and small
robotics education start-up.
Hello! I am Mithi!
Here are a few things
we do at Nanica.io
(it’s video time, guys!)
Our most recent
project is
Arduino Boot Camp:
A Different Approach!
I designed it
with <3 (love)
for beginners and
intermediate Arduino users
You can find it at:
http://
ArduinoBootCamp.xyz
It’s NOT your usual
Basic Arduino
Workshop >_<
How?
Well, let me give you
an example.
Usually, in beginner
workshops, you are
taught the following:
ONE:How to blink an
LED
TWO:How to blink an
LED without delay()
THREE:How to make
a breathing LED
FOUR:How to sweep
a servo back and
forth
FIVE:How to light an
LED with a debounced
button
This is how the
official Arduino
website teaches you
how to blink an LED...
digitalWrite(13, HIGH);
// turn the LED on (HIGH is the voltage level)
delay(1000);
// wait for a second
digitalWrite(13, LOW);
// turn the LED off by making the voltage LOW
delay(1000);
// wait for a second
We help you learn
how you can do this
instead:
led.Toggle();
delay(1000);
This is how the
official Arduino
website teaches you
how to blink an LED
without delay()...
unsigned long currentMillis = millis();
if(currentMillis - previousMillis >= interval)
{
previousMillis = currentMillis;
if (ledState == LOW)
ledState = HIGH;
else
ledState = LOW;
digitalWrite(ledPin, ledState);
}
We help you learn
how you can do this
instead:
if(metronome.Tick())
led.Toggle();
This is how the
official Arduino
website teaches you
how to make a
breathing LED...
int fadeValue;
for(fadeValue=0; fadeValue<=255; fadeValue+=5)
{
analogWrite(ledPin, fadeValue);
delay(30);
}
for(fadeValue=255; fadeValue>=0; fadeValue-=5)
{
analogWrite(ledPin, fadeValue);
delay(30);
}
We help you learn
how you can do this
instead:
led.Set(sweeper.Next(metronome.Tick()));
This is how the
official Arduino
website teaches you
how to sweep a
servo...
for (pos = 0; pos <= 180; pos += 1) {
servo.write(pos);
delay(15);
}
for (pos = 180; pos >= 0; pos -= 1) {
servo.write(pos);
delay(15);
}
We help you learn
how you can do this
instead:
servo.write(sweeper.Next(metronome.Tick()));
This is how the official
Arduino website
teaches you
how to light an LED with
a debounced button...
int reading = digitalRead(buttonPin);
if (reading != lastButtonState) {
lastDebounceTime = millis();
}
if ((millis() - lastDebounceTime) >
debounceDelay) {
if (reading != buttonState) {
buttonState = reading;
if (buttonState == HIGH)
ledState = !ledState;
}
}
digitalWrite(ledPin, ledState);
lastButtonState = reading;
We help you learn
how you can do this
instead:
button.Pressed() ? led.On() : led.Off();
Basically, it’s different
because it
emphasizes the
following things
immediately:
ONE: CLEAN
READABLE CODE
TWO: BASIC OBJECT-
ORIENTED DESIGN
THREE: REDUCED
USAGE OF delay()so
you can multi-task
anytime.
BUT HOW DO YOU
DO THAT????!?
The obvious message
here is how you can
use the power of
OOP design
thinking...
... to abstract
implementation
details...
... so that you can
focus at the things
you want to do.
You get the beneficial
side-effects as well:
Code that is easy to
understand.
Code that is easy to
debug.
Code that is multi-
tasking ready.
Code that is scalable.
Easily add as many buttons and LEDs as the
Arduino can allow.
Code that allows
more complex
behavior.
Add more features and functions without
overwhelming yourself.
BUT…
HOW DO YOU DO
THAT EXACTLY
????!?
The first step is to
identify the OBVIOUS
objects
LED, BUTTON, and
SERVO
(the Arduino already has a built-in servo
class in one of its libraries)
DigitalOutput led;
led.New(int pin);
led.On();
led.Off();
led.Toggle();
led.Set(int brightness);
Button button;
button.New(pin, debounceTime);
bool state = button.Pressed();
The next step is to
identify not so
obvious objects
sweeper.New(x1, x2, inc, type);
sweeper.Next(0/1);
// type = BACKANDFORTH/NORMAL
/* if 0, returns current state
** if 1, updates to and return
** next state */
metronome.New(milliSeconds)
bool hasTicked= metronome.Tick()
You can use sweeper
in myriad
applications…
not just servos and
LEDs...
You can use this to
toggle buttons,
play tunes,
do countdowns...
and even do away
with long subroutines
because of for-loops.
Using metronome instead
of delay(), you get a more
readable code that’s even
multi-tasking ready.
You can even sweep
multiple servos….
...blink and sweep
multiple LEDs...
...(simultaneously,
and at different
rates )...
...while catching as
many buttons as you
wish...
...without making
your code a
nightmare.
You can even sweep multiple
servos, blink and sweep multiple
LEDs, (simultaneously,
at different rates)
while catching as many buttons as
you wish,
without making your code a
nightmare.
Awesome right?!!
There’s more where
that came from!
Again, check it out!
http://
ArduinoBootCamp.xyz
But wait...
...what about
performance?
Only sacrifice readability
for performance if you
have measured that your
code is too slow for its
intended use.
Correct.
Beautiful.
Fast.
(in that order)
-Elliot Rusty Harold
Premature
optimization is the
root of all evil.
-Sir Tony Hoare
I hope to dispel the
myth that fast code
must be illegible ugly
code...
-Elliot Rusty Harold
...improvement in
beauty can also lead
to improvement in
speed.
-Elliot Rusty Harold
Hope you join our
Arduino Boot Camp!!
One more thing though:
My code is not God ;)
Again, hope you join our
Arduino Boot Camp!!
And thank you
for listening!
:)

Weitere ähnliche Inhalte

Was ist angesagt?

Arduino Full Tutorial
Arduino Full TutorialArduino Full Tutorial
Arduino Full Tutorial
Akshay Sharma
 
Arduino learning
Arduino   learningArduino   learning
Arduino learning
Anil Yadav
 

Was ist angesagt? (20)

Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Arduino experimenters guide hq
Arduino experimenters guide hqArduino experimenters guide hq
Arduino experimenters guide hq
 
Arduino slides
Arduino slidesArduino slides
Arduino slides
 
Arduino Slides With Neopixels
Arduino Slides With NeopixelsArduino Slides With Neopixels
Arduino Slides With Neopixels
 
Arduino Full Tutorial
Arduino Full TutorialArduino Full Tutorial
Arduino Full Tutorial
 
Presentation
PresentationPresentation
Presentation
 
Ardui no
Ardui no Ardui no
Ardui no
 
Lab2ppt
Lab2pptLab2ppt
Lab2ppt
 
2015-10-21 - Arduino workshop
2015-10-21 - Arduino workshop2015-10-21 - Arduino workshop
2015-10-21 - Arduino workshop
 
Arduino
ArduinoArduino
Arduino
 
Arduino by John LeMasney via lemasney.com
Arduino by John LeMasney via lemasney.comArduino by John LeMasney via lemasney.com
Arduino by John LeMasney via lemasney.com
 
Introduction to Arduino with ArduBlock & SparkFun LilyPad
Introduction to Arduino with ArduBlock & SparkFun LilyPadIntroduction to Arduino with ArduBlock & SparkFun LilyPad
Introduction to Arduino with ArduBlock & SparkFun LilyPad
 
Arduino Introduction Guide 1
Arduino Introduction Guide 1Arduino Introduction Guide 1
Arduino Introduction Guide 1
 
Arduino Workshop
Arduino WorkshopArduino Workshop
Arduino Workshop
 
Arduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic ArduinoArduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic Arduino
 
NSTA 2013 Denver - ArduBlock and Arduino
NSTA 2013 Denver - ArduBlock and ArduinoNSTA 2013 Denver - ArduBlock and Arduino
NSTA 2013 Denver - ArduBlock and Arduino
 
Basic Sensors
Basic Sensors Basic Sensors
Basic Sensors
 
arduino
arduinoarduino
arduino
 
Arduino learning
Arduino   learningArduino   learning
Arduino learning
 
Introduction to Arduino Programming
Introduction to Arduino ProgrammingIntroduction to Arduino Programming
Introduction to Arduino Programming
 

Andere mochten auch (10)

Stuff harvesting - Gather your electronic components for hobbyist
Stuff harvesting - Gather your electronic components for hobbyistStuff harvesting - Gather your electronic components for hobbyist
Stuff harvesting - Gather your electronic components for hobbyist
 
Basic electronics
Basic electronicsBasic electronics
Basic electronics
 
Digital electronics
Digital electronicsDigital electronics
Digital electronics
 
Basics of Electronics
Basics of ElectronicsBasics of Electronics
Basics of Electronics
 
Routing Protocols and Concepts - Chapter 1
Routing Protocols and Concepts - Chapter 1Routing Protocols and Concepts - Chapter 1
Routing Protocols and Concepts - Chapter 1
 
Basics of digital electronics
Basics of digital electronicsBasics of digital electronics
Basics of digital electronics
 
Introduction to Basic Electronics
Introduction to Basic ElectronicsIntroduction to Basic Electronics
Introduction to Basic Electronics
 
Basic electronics and electrical first year engineering
Basic electronics and electrical first year engineeringBasic electronics and electrical first year engineering
Basic electronics and electrical first year engineering
 
Electronic Components
Electronic ComponentsElectronic Components
Electronic Components
 
Electronics ppt
Electronics ppt Electronics ppt
Electronics ppt
 

Ähnlich wie Arduino Boot Camp Pitch Slides

Arduino: Analog I/O
Arduino: Analog I/OArduino: Analog I/O
Arduino: Analog I/O
June-Hao Hou
 
Getting startedwitharduino ch04
Getting startedwitharduino ch04Getting startedwitharduino ch04
Getting startedwitharduino ch04
Anil Yadav
 

Ähnlich wie Arduino Boot Camp Pitch Slides (20)

Lesson sample introduction to arduino
Lesson sample   introduction to arduinoLesson sample   introduction to arduino
Lesson sample introduction to arduino
 
Ardx experimenters-guide-web
Ardx experimenters-guide-webArdx experimenters-guide-web
Ardx experimenters-guide-web
 
How to hack electronics
How to hack electronics How to hack electronics
How to hack electronics
 
Arduino programming
Arduino programmingArduino programming
Arduino programming
 
Arduino experimenters guide ARDX
Arduino experimenters guide ARDXArduino experimenters guide ARDX
Arduino experimenters guide ARDX
 
Arduino اردوينو
Arduino اردوينوArduino اردوينو
Arduino اردوينو
 
Arduino: Analog I/O
Arduino: Analog I/OArduino: Analog I/O
Arduino: Analog I/O
 
Arduino workshop
Arduino workshopArduino workshop
Arduino workshop
 
Scottish Ruby Conference 2010 Arduino, Ruby RAD
Scottish Ruby Conference 2010 Arduino, Ruby RADScottish Ruby Conference 2010 Arduino, Ruby RAD
Scottish Ruby Conference 2010 Arduino, Ruby RAD
 
arduinoSimon.ppt
arduinoSimon.pptarduinoSimon.ppt
arduinoSimon.ppt
 
arduinoSimon.ppt
arduinoSimon.pptarduinoSimon.ppt
arduinoSimon.ppt
 
arduinoSimon.ppt
arduinoSimon.pptarduinoSimon.ppt
arduinoSimon.ppt
 
Basic arduino sketch example
Basic arduino sketch exampleBasic arduino sketch example
Basic arduino sketch example
 
All about ir arduino - cool
All about ir   arduino - coolAll about ir   arduino - cool
All about ir arduino - cool
 
Ardx eg-spar-web-rev10
Ardx eg-spar-web-rev10Ardx eg-spar-web-rev10
Ardx eg-spar-web-rev10
 
Lab 2_ Programming an Arduino.pdf
Lab 2_ Programming an Arduino.pdfLab 2_ Programming an Arduino.pdf
Lab 2_ Programming an Arduino.pdf
 
Arduino: Intro and Digital I/O
Arduino: Intro and Digital I/OArduino: Intro and Digital I/O
Arduino: Intro and Digital I/O
 
ATTiny Light Sculpture Project - Part I (Setup)
ATTiny Light Sculpture Project - Part I (Setup)ATTiny Light Sculpture Project - Part I (Setup)
ATTiny Light Sculpture Project - Part I (Setup)
 
Getting startedwitharduino ch04
Getting startedwitharduino ch04Getting startedwitharduino ch04
Getting startedwitharduino ch04
 
Arduino Workshop Slides
Arduino Workshop SlidesArduino Workshop Slides
Arduino Workshop Slides
 

Mehr von Mithi Sevilla (9)

Democratizing technology. democratizing access to space.
Democratizing technology. democratizing access to space.Democratizing technology. democratizing access to space.
Democratizing technology. democratizing access to space.
 
Why play... (With Robots and Arduino)
Why play... (With Robots and Arduino)Why play... (With Robots and Arduino)
Why play... (With Robots and Arduino)
 
A Raspberry Pi Hexy - Python Conference PH 2016
A Raspberry Pi Hexy -  Python Conference PH 2016A Raspberry Pi Hexy -  Python Conference PH 2016
A Raspberry Pi Hexy - Python Conference PH 2016
 
A Raspberry Pi Hexy - short
A Raspberry Pi Hexy - shortA Raspberry Pi Hexy - short
A Raspberry Pi Hexy - short
 
A raspberry pi hexy
A raspberry pi hexyA raspberry pi hexy
A raspberry pi hexy
 
Playing with your hands
Playing with your handsPlaying with your hands
Playing with your hands
 
Is engineering for me
Is engineering for meIs engineering for me
Is engineering for me
 
Arduino bootcamp
Arduino bootcampArduino bootcamp
Arduino bootcamp
 
Nanica company talk
Nanica company talkNanica company talk
Nanica company talk
 

Kürzlich hochgeladen

Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
ssuserdda66b
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 

Kürzlich hochgeladen (20)

Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 

Arduino Boot Camp Pitch Slides