SlideShare a Scribd company logo
1 of 15
Download to read offline
STEMNET AMBASSADORS

                           Getting Started with
                              Programming
                  Arduino and Scratch (and anything else)



                                 Ian Hughes/epredator
                             http://www.feedingedge.co.uk

Thursday, 14 February 13
A way to explain
                             (not the only way)




Thursday, 14 February 13
Wanting to make these




  But seeing this
        //populate the implied list of active zones (not exit points)
        //assumes a grouped in order and consitent file.
        void PopulateUniqueZone ()
        {
        	          countzones = 0;
        	          string currentzone = "";
        	          for (int i=0; i<totalbays; i++) {
        	          	          //find zone if different from last one
        	          	          if ((myBays [i].bZoneName != currentzone) && (myBays [i].bType == "a")) {
        	          	          	          zonelist [countzones] = myBays [i].bZoneName;
        	          	          	          currentzone = myBays [i].bZoneName;
        	          	          	          countzones++;
        	          	          }
        	          	
        	          	
        	          }
        	
        }
                                 Scary? Put’s people off?
Thursday, 14 February 13
So lets make it simpler and
    related to the physical world


    At it’s heart all computing tech is as simple as a light switch




Thursday, 14 February 13
Layer with a real world example

                                We go into a room
                                    If it is dark
                      Then we turn on the light with the switch




Thursday, 14 February 13
Set the foundation of all computing
                            We Sense
                             Decide
                               Act
                                or
                              Input
                             Process
                             Ouput




Thursday, 14 February 13
With the building blocks of
                                     Input
                                    Process
                                    Output
                           You can build everything




Thursday, 14 February 13
Now for the hardware
       Arduino is an open source switch that we can program
                We can add things to make it Sense
               Make decisions based on those things
                Act (e.g. switch something on or off)




Thursday, 14 February 13
Our first “control structures”


                                  First example
                                Turning on a light

                           Lets us build a simple circuit
                            The Arduino is the switch
                             We program the switch

        That leads to getting the program to repeat an activity
            On and off forever, flashing intermittently etc.



Thursday, 14 February 13
Making decisions

                                Second example
                             Turning on several lights

                           Lets us build a simple circuit
                            The Arduino is the switch
                             We program the switch

     We can make decisions over which light to switch in code
               Make the lights ripple on and off?




Thursday, 14 February 13
Full Sense Decide Respond - Arduino Spaceship interface
            http://arduino.cc/en/ArduinoStarterKit/Prj02



                            Third example
                            Add a sensor

           Some input that we can test and decide what to do
                   Speed up/slow down the flashing




Thursday, 14 February 13
Same pattern as before
                                      Scratch
                           Another programming language




Thursday, 14 February 13
Same pattern as before


          Sense
          Decide
           Act

               or

          Input
         Process
         Output



Thursday, 14 February 13
Create an object on the screen

                             Use code to move the object

                           Use code to sense our key presses

          Use those key presses to move the object with code

                 Sense collisions with another object on screen

                             Make a blockbuster AAA game



Thursday, 14 February 13
Pil Seung
                                   (Certain Victory)




                               Ian Hughes/epredator
                           http://www.feedingedge.co.uk

Thursday, 14 February 13

More Related Content

More from Ian Hughes / epredator

More from Ian Hughes / epredator (11)

Feedingedgeblendedbristolbcs2014
Feedingedgeblendedbristolbcs2014Feedingedgeblendedbristolbcs2014
Feedingedgeblendedbristolbcs2014
 
Bcs Review 2013 tech in 2014
Bcs Review 2013 tech in 2014Bcs Review 2013 tech in 2014
Bcs Review 2013 tech in 2014
 
Are we any closer to a holodeck?
Are we any closer to a holodeck?Are we any closer to a holodeck?
Are we any closer to a holodeck?
 
Getting tech into Schools and TV land
Getting tech into Schools and TV landGetting tech into Schools and TV land
Getting tech into Schools and TV land
 
Blended Reality Learning
Blended Reality LearningBlended Reality Learning
Blended Reality Learning
 
Hack to the Future - 3d printing and beyond
Hack to the Future - 3d printing and beyondHack to the Future - 3d printing and beyond
Hack to the Future - 3d printing and beyond
 
Washing away cave paintings v3
Washing away cave paintings v3Washing away cave paintings v3
Washing away cave paintings v3
 
Not all avatars and islands?
Not all avatars and islands?Not all avatars and islands?
Not all avatars and islands?
 
Virtual Worlds / Second Life / Business use?
Virtual Worlds / Second Life / Business use?Virtual Worlds / Second Life / Business use?
Virtual Worlds / Second Life / Business use?
 
Business Process Management and Virtual Worlds
Business Process Management and Virtual WorldsBusiness Process Management and Virtual Worlds
Business Process Management and Virtual Worlds
 
2008, Jan 14 Ian Hughes Metaverses And Virtual Worlds
2008, Jan 14  Ian Hughes Metaverses And Virtual Worlds2008, Jan 14  Ian Hughes Metaverses And Virtual Worlds
2008, Jan 14 Ian Hughes Metaverses And Virtual Worlds
 

Recently uploaded

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 

Recently uploaded (20)

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 

Arduinointech

  • 1. STEMNET AMBASSADORS Getting Started with Programming Arduino and Scratch (and anything else) Ian Hughes/epredator http://www.feedingedge.co.uk Thursday, 14 February 13
  • 2. A way to explain (not the only way) Thursday, 14 February 13
  • 3. Wanting to make these But seeing this //populate the implied list of active zones (not exit points) //assumes a grouped in order and consitent file. void PopulateUniqueZone () { countzones = 0; string currentzone = ""; for (int i=0; i<totalbays; i++) { //find zone if different from last one if ((myBays [i].bZoneName != currentzone) && (myBays [i].bType == "a")) { zonelist [countzones] = myBays [i].bZoneName; currentzone = myBays [i].bZoneName; countzones++; } } } Scary? Put’s people off? Thursday, 14 February 13
  • 4. So lets make it simpler and related to the physical world At it’s heart all computing tech is as simple as a light switch Thursday, 14 February 13
  • 5. Layer with a real world example We go into a room If it is dark Then we turn on the light with the switch Thursday, 14 February 13
  • 6. Set the foundation of all computing We Sense Decide Act or Input Process Ouput Thursday, 14 February 13
  • 7. With the building blocks of Input Process Output You can build everything Thursday, 14 February 13
  • 8. Now for the hardware Arduino is an open source switch that we can program We can add things to make it Sense Make decisions based on those things Act (e.g. switch something on or off) Thursday, 14 February 13
  • 9. Our first “control structures” First example Turning on a light Lets us build a simple circuit The Arduino is the switch We program the switch That leads to getting the program to repeat an activity On and off forever, flashing intermittently etc. Thursday, 14 February 13
  • 10. Making decisions Second example Turning on several lights Lets us build a simple circuit The Arduino is the switch We program the switch We can make decisions over which light to switch in code Make the lights ripple on and off? Thursday, 14 February 13
  • 11. Full Sense Decide Respond - Arduino Spaceship interface http://arduino.cc/en/ArduinoStarterKit/Prj02 Third example Add a sensor Some input that we can test and decide what to do Speed up/slow down the flashing Thursday, 14 February 13
  • 12. Same pattern as before Scratch Another programming language Thursday, 14 February 13
  • 13. Same pattern as before Sense Decide Act or Input Process Output Thursday, 14 February 13
  • 14. Create an object on the screen Use code to move the object Use code to sense our key presses Use those key presses to move the object with code Sense collisions with another object on screen Make a blockbuster AAA game Thursday, 14 February 13
  • 15. Pil Seung (Certain Victory) Ian Hughes/epredator http://www.feedingedge.co.uk Thursday, 14 February 13