who are we teaching to…

98
Who are we teaching to… http://bit.ly/ audiencebvsd2013/

Upload: thora

Post on 20-Jan-2016

17 views

Category:

Documents


0 download

DESCRIPTION

Who are we teaching to…. http:// bit.ly/audiencebvsd2013/. http:// bit.ly/bvsdsparkfun2013 http:// bit.ly/bvsdsparkfun2013pdf http:// bit.ly/1d9igxs. With Protosnap Pro Mini. Introduction to Arduino. Brian Huang Education Engineer. Jim Limblom Design Engineer. Ben Leduc-Mills - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Who are we teaching to…

Who are we teaching to…

http://bit.ly/audiencebvsd2013/

Page 2: Who are we teaching to…
Page 3: Who are we teaching to…

http://bit.ly/bvsdsparkfun2013

http://bit.ly/bvsdsparkfun2013pdf

http://bit.ly/1d9igxs

Page 4: Who are we teaching to…

Introduction to ArduinoWith Protosnap Pro Mini

BRIAN HUANGEducation Engineer

JIM LIMBLOMDesign Engineer

BEN LEDUC-MILLSEducation Outreach

Coordinator

Page 5: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Ignite Format

 Speakers are given 20 slides, each shown for 15 seconds, giving each speaker 5 minutes of fame.

Why do it?? • Keeps the slides moving.• Gives students a well defined format to

rehearse and practice.• It’s fast, fun, and crazy…

Page 6: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

In 5 minutes…

• About SparkFun• Learning Outcomes• Motivation behind all of this• What is Arduino• Examples of projects and things

people have done…

Page 7: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

About Us

SparkFun Electronics is an Open Source Hardware Company. We are all about creation, innovation and sharing information. We want to get you excited about cutting edge electronics technology.

Page 8: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Learning Outcomes

You will understand basic electrical and computational principles used in making, building, and inventing with Arduino.

You will be able to design and write programs to interface sensors and control LEDs, buzzers, and other devices.

Page 9: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Motivation

Page 10: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Page 11: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Invent To Learn

Page 12: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Tinkering -- A Mindset For Learning

“When we allow children to experiment, take risks, and play with their own ideas, we give them permission to trust themselves. They begin to see themselves as learners who have good ideas and can transform their own ideas into reality.”Martinez, Sylvia Libow., and Gary Stager. Invent to Learn: Making, Tinkering, and Engineering in

the Classroom. Torrance, CA: Constructing Modern Knowledge, 2013. N. p.31-32.

Page 13: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

From Tinkering to Engineering…

“Engineering is the application of scientific principles to design, build, and invent.”

It is “…any engagement in a systematic practice of design to achieve solutions to particular human problems.”

Martinez, Sylvia Libow., and Gary Stager. Invent to Learn: Making, Tinkering, and Engineering in the Classroom. Torrance, CA: Constructing Modern Knowledge, 2013. N. p.31-32.

Page 14: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Engineering as Solving Problems…

“We teach science and math so that they can make the world a better place, not so that they can pass tests.”

Martinez, Sylvia Libow., and Gary Stager. Invent to Learn: Making, Tinkering, and Engineering in the Classroom. Torrance, CA: Constructing Modern Knowledge, 2013. N. p.31-32.

Page 15: Who are we teaching to…

I want ________ to ________.

Page 16: Who are we teaching to…

What is it all about?

Stop Following Directions

& Start Engineering

Page 17: Who are we teaching to…

The Learning Cycle

Time to play, reflect, question and redesign

Page 18: Who are we teaching to…

Computer Science Education Act (CSEA)

Page 19: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Program or be programmed

If nothing else – we must help to developing a computationally literate society…

Page 20: Who are we teaching to…

What is Arduino…(circa 2005) Small, low-cost micro-controller (mini-

computer).

Describes both the hardware (board) and the programming language.

Developed off the Atmel ATMega328 chip.

Designed with Artists & Non-Engineers in mind…

Page 21: Who are we teaching to…

But… what is it???

Think of this as a mini-brain…

Page 22: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Nearly a million ideas…

Page 23: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Some cool projects

Page 24: Who are we teaching to…
Page 25: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Project: Mood Lamp / Light Sculpture

Page 26: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Page 27: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Massimo Banzi TED Talk2012 Edinborough

Page 28: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Further Motivation

Page 29: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

From the NGSS

The practices describe behaviors that scientists engage in as they investigate and build models and theories about the natural world and the key set of engineering practices that engineers use as they design and build models and systems.

Page 30: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Agenda

- Ignite Introduction- Protosnap ProMini vs. Arduino- ArduBlock – Graphical Programming for

Beginners…- Adult - Open Swim- Arduino IDE Programming Environment- Data Collection Demo- Resources

Page 31: Who are we teaching to…

Protosnap ProMini vs. Arduino

Page 32: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Page 33: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Page 34: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Installing ArduBlock

Create a folder structure:

tools\ArduBlockTool\tool\

tool ArduBlockTool tool

under the \My Documents\Arduino folder

Save \ Move the ArduBlock.jar file here.

Note: the folder names are case-sensitive!!!

Page 35: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

General Rules

Raise your hand if you have a question.Be respectful.When I raise my hand…Share your findings with the people

near you.Poke around, experiment, and have

fun…Imagine, create, and play!!!

Page 36: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

The ProtoSnap ProMini Board

Page 37: Who are we teaching to…

Pin ConnectionsWhere you attach sensors, LEDs, button switches, etc…

Page 38: Who are we teaching to…

Actual Pin-outs

Page 39: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Flip the Board Over

Do you see the wires that are running to the sensors, LEDs, and buttons?The microcontroller is pre-wired to the inputs and outputs on this board.

Page 40: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

The ProtoSnap Pro Mini Board

Page 41: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Notes on Vocabulary

Vcc = Common Collector Voltage (+5 V or the positive terminal of the power source)

GND = Ground (also referred to as the negative terminal of the power)

Circuit = Circle

Plated Through Hole

Page 42: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

No Circuit building, no fuss

Page 43: Who are we teaching to…

Startup Arduino IDE

Double-click on either the Arduino Icon or wherever you installed (saved) the Arduino program.

Page 44: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Plug it in

Page 45: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Lesson #0 – Configuring Arduino

1. Setup Board (LilyPad Arduino w/ ATmega328)

2. Setup COM PortPC – Highest COM #Mac – /dev/tty.usbserial-A####xXx

Page 46: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Settings: Tools Board

Page 47: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Settings: Tools Serial Port

Page 48: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Other Board Types

Page 49: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Start ArduBlockTools ArduBlock

Page 50: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

ArduBlock

Introduction to ProgrammingScratch-like interfaceClear transition to text-based coding

Page 51: Who are we teaching to…

Lesson #0 – Test Upload

Page 52: Who are we teaching to…

Check for Status Messages

Page 53: Who are we teaching to…
Page 54: Who are we teaching to…

Block Organization in ArduBlock

Page 55: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Block OrganizationControl

Page 56: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Block OrganizationPins

Page 57: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Block OrganizationNumbers/Constants

Page 58: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Let’s get to hacking…

Lesson #1 – Blinking an LED“Hello World” of Physical Computing

Psuedo-code – how should this work?

Page 59: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Let’s get to hacking…

Lesson #1 – Blinking an LED“Hello World” of Physical Computing

Page 60: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Alright? Let’s blink!

Challenge 1a – Sweet Heart. Blink to mimic a heartbeat…

Challenge 1b – Too Fast! Experiment with the blink rate. What’s the fastest blink rate you can see? 1 ms? 2 ms??

Challenge 1c – Three in One! Use the RGB LED to create different combinations and patterns of light. Anything peculiar?

Page 61: Who are we teaching to…

Save your Project

• Save early, Save often!

• Enumerate your iterations – (e.g. blink_10.adp, blink_11.adp, blink_12.adp…)

Page 62: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

New Challenge…

Create a blink that starts off with a 10 ms delay and gets progressively slower and slower…

What would the pseudo-code look like for this:

Page 63: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Programming Concepts: Variables

Variable Types:

8 bits 16 bits 32 bits

byte char

intunsigned int

longunsigned longfloat

Page 64: Who are we teaching to…

Using VariablesNumbers/Constants

Variable is just a placeholder for a value.

Notice the different shapes?

Page 65: Who are we teaching to…

Example: Did you come up with something like this?

Page 66: Who are we teaching to…

Serial Monitor

Serial print command

Any message

“glue”

Data

Page 67: Who are we teaching to…

Add this block… so that we can watch the variable value

Page 68: Who are we teaching to…

Upload & Click back to ArduinoOpen the Serial Monitor

Page 69: Who are we teaching to…

Conditional StatementsIf()… else…

test conditions – aka Boolean

Greater Than

Less Than

Equal To

Greater or Equal

Less or Equal

Not Equal to

Page 70: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Aside from just blinking (on and off), what else might we want to do??

Page 71: Who are we teaching to…

Understanding: Analog vs. Digital

Microcontrollers are digital devices – ON or OFF.

An Analog signal is anything that can be a full range of values. What are some examples? Think of like a ramp or a hill.

Page 72: Who are we teaching to…

Understanding: Analog vs. Digital

To create an analog signal, the microcontroller uses a technique called PWM.

Pulse Width Modulation (PWM)

Pins 3, 5, 6, 9, 10, 11 are capable of producing an Analog Output

Page 73: Who are we teaching to…

In ArduBlock

Digital OUTPUTHIGH or LOW

PIN# -- 0 to 13

SHAPE

Analog OUTPUT0 to 255

PIN# -- 3, 5, 6, 9, 10, 11

SHAPE

Page 74: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Color Mixing with 3 LEDsanalogWrite()

Challenge 2a:

1)How do you turn on the RED LED?

2)Experiment with different values – what do you observe happens? Anything peculiar??

3)How do you turn on the GREEN or the BLUE LED?

Page 75: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Blinking in 3 colors Tri-color LED

Only to throw you for a loop…RGB LED is a Common-Anode (means the positive side of the LED is all tied to Vcc)

Pin3

Pin5

Pin6

Page 76: Who are we teaching to…

We’ve controlled stuff… what’s next?

Page 77: Who are we teaching to…

What about Getting INPUT?

Digital INPUTRange: ??

PIN# -- 0 to 13

SHAPE

Analog INPUTRange: ??

PIN# -- 0 to 5(A0 to A5)

SHAPE

Page 78: Who are we teaching to…

Digital Input & Feedback – Serial Monitor

Serial print command

Any message

“glue”

Data

Page 79: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Example

or

Page 80: Who are we teaching to…

Digital Input & Conditional Logic

Page 81: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Challenge --

When the button is pressed, blink the LED 10 times.

Page 82: Who are we teaching to…

In ArduBlock

Digital OUTPUTHIGH or LOW

PIN# -- 0 to 13

SHAPE

Analog OUTPUT0 to 255

PIN# -- 3, 5, 6, 9, 10, 11

SHAPE

Page 83: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Last bit… the buzzer

Final command to know:

tone(pin, freq, duration);

pin – the OUTPUT pin the buzzer is connected to.

freq – unsigned int (0 … 65,535)

duration – unsigned long (0 … 2^32 - 1)

Page 84: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Musical Notes / Frequencies

Note  Frequency (Hz)C4 261

C#4/Db

4 277D4 293

D#4/Eb

4 311E4 329F4 349

F#4/Gb

4 369G4 392

G#4/Ab

4 415A4 440

A#4/Bb

4 466B4 493

Note  Frequency (Hz)C5 523

C#5/Db

5 554D5 587

D#5/Eb

5 622E5 659F5 698

F#5/Gb

5 739G5 783

G#5/Ab

5 830A5 880

A#5/Bb

5 932B5 987

Page 85: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

World’s cheapest dubstep instrument

Tie both the buzzer and the LED to light sensor… and, create the world’s cheapest dub step instrument.

Play with the frequency – scale it by applying multiplier factors or offsets.

Page 86: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

OK? What’s going on under the hood?

Page 87: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Arduino Code, Examples, References, etc…

Page 88: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Find in Reference

Page 89: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

A partnership…

Page 90: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Resources

Programming Cheat Sheet http://bit.ly/ArduinoCheatSheet

Download Arduino / Reference http://arduino.cc/en/

Page 91: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Additional Resources

http://www.sparkfun.com

http://learn.sparkfun.com

http://www.arduino.cc

http://www.bildr.org

Page 92: Who are we teaching to…
Page 93: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

SparkFun Tutorials and Projects

- GardenBot: www.sparkfun.com/news/598

- High Altitude Balloon:www.sparkfun.com/tutorials/180

- GPS Clock: www.sparkfun.com/tutorials/47

- Earthquake Data Logger: www.sparkfun.com/tutorials/235

Page 94: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Thousands of Amazing ideas…

The Cat Defender…http://www.plasma2002.com/

blenderdefender/List of projects at Sparkfun:http://goo.gl/2M3AM

Page 95: Who are we teaching to…

Questions?

Page 96: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Your to keep…

The little red box, the protosnap Pro Mini, and the cable are yours to keep today.

Please e-mail us with ideas and things that you end up doing at your school.

Thanks!

email: [email protected]

Page 97: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

Before leaving, please fill out a quick survey.

Thanks!

http://www.sparkfun.com/WorkshopFeedback

Feedback?

Page 98: Who are we teaching to…

                          

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.

www.sparkfun.com6175 Longbow Drive, Suite 200

Boulder, Colorado 80301