Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston

30

Transcript of Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston

Page 1: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston
Page 2: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston

Pause…

Before we move any further, let’s make sure that we all know each other in this room?

Please introduce yourself to the person(s) sitting in your general vicinity. Tell them a few things about yourself, maybe:

– where you’re from

– what you teach

– why you’re here

– what you hope to get out of this….

Page 3: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston

About Us

At SparkFun, our focus is all about creation,

innovation, and sharing information.

Open Source Hardware is at the core of our

business. We emphasize researching, re-

mixing, adapting, making improvements, and

sharing with the world!

Page 4: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston
Page 5: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston
Page 6: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston
Page 7: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston

“Teachers that make… Make great teachers”

-Anonymous

Page 8: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston

Arduino / Microcontrollers a.k.a. Physical Computing

“Arduino is a tool for making computers that can sense and control more of the physical world than your desktop computer.”

A micro-controller is essentially a brain – or, think of a bunch of programmable “elves…”

It is the guts of something like Vernier, Pasco, or Fourier

Page 9: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston

What can this thing do?

Remember, think programmable “elves”

We can use this to:- Turn on lights

- Interface cameras (take photos)

- Log sensor data (temp, pressure, humidity, light…)

- Communicate with your PC and the internet (a.k.a. Internet of Things)

- Take Science Fair to the next level…

Page 10: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston

How it works?

01010011 01110000 01100001 01110010 01101011

01000110 01110101 01101110

SERIAL DATA @ 9600 baud

Page 11: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston

Hardware Configurations /

Connections

What’s a Pin?14 general digital input / output pins

6 analog input pins (Pins A0 – A5)

Nitty Gritty:Powered off anything from 7 – 15V DC

Voltage Regulator provides 5V and 3.3V

Standard TTL logic – 5V is HIGH, and 0V is LOW.

Page 12: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston

Getting started

• Download Arduino from:

www.arduino.cc/download

• Follow their directions on installation.

Page 13: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston

Startup Arduino IDE

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

Page 14: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston

Plug in your RedBoard (Arduino)

Page 15: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston

Lesson #0 – Setting up Arduino

1.Setup Board

–Arduino Uno

2.Setup COM Port

–PC – Highest COM #

–Mac – /dev/tty.usbserial-A####xXx

Page 16: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston

Tools Board Arduino UnoSetup Board

Page 17: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston

Tools Serial PortSetup COM Port

PC –

Highest COM #

Mac –

/dev/tty.usbserial-A####xxx

Page 18: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston

Anatomy of code

General syntax:

– Case-sensitive

– Semi-colons

– Curly-brackets

void functionName()

Page 19: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston

Just the basicsTurning an LED on and off…

Page 20: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston

Open Challenges

1) Create a heartbeat – a realistic one!

2) What is the fastest blink that your eye can detect? What is the frequency of this blink?

Now, move the LED back and forth – do you see a “trail”? What are some interesting scientific investigations you can explore with this?

3) What about making a timer?? – blink the LED for 10 seconds and then stop!

4) What other ideas?

Page 21: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston

Introducing the Danger Shield

What’s a Shield?

Page 22: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston

Sensing – Slider – AnalogRead(A0)

Page 23: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston

Serial Monitor

01010011 01110000 01100001 01110010 01101011

01000110 01110101 01101110

SERIAL DATA @ 9600 baud

Page 24: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston

Sensing – Light – AnalogRead(A3)

Page 25: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston

Sensing – Temp – AnalogRead(A4)

This sensor: TMP36 has a sensitivity of 10 mV / °C = 100°C / V and is 750 mV at 25 °C.

Page 26: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston

Converting between ADC value to voltage?

Page 27: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston

Pre-created example programs

Page 28: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston

Preview of Digital SandBox

Slider / PotentiometerSwitch

Motor / Speaker Out

Push Button

MicrophoneLight Sensor

Temp Sensor

LED Array

RGB LED

Arduino

Page 29: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston

Now what?

• Interested in professional development? Want to learn more?

– Check-out our SparkFun Inventor’s Kit (SIK)

– Also sold as a lab-pack for schools

– 15 complete circuits with a full-color experiment guide.

– Guide is available as a PDF.

• Teacher Prof. Dev Workshops available:

– Contact: [email protected]

Page 30: Maker Science with Arduino and SparkFun Electronics @NSTA14 Boston

Questions?

email: [email protected]

twitter: @sparkfun

Interested in any of this?

E-mail us about our 20% educator discount –[email protected]