Movatterモバイル変換


[0]ホーム

URL:


Felipe Belarmino, profile picture
Uploaded byFelipe Belarmino
PDF, PPTX1,906 views

Arduino spooky projects_class1

This document provides an introduction and overview of Arduino and microcontrollers for a class on spooky projects. It includes:- An introduction to the Arduino microcontroller board, its components, and how it can be programmed from a computer. - A breakdown of what is in the class kit that students received, including components like an Arduino board, breadboard, LEDs, resistors, and more. - Instructions on how to build simple circuits like an LED flashlight and a blinking LED program using the Arduino board.- An outline of what will be covered in future classes, like reading buttons, analog sensors, and more complex LED programs.

Embed presentation

Download as PDF, PPTX
Spooky ProjectsIntroduction to Microcontrollers with ArduinoClass 17 Oct 2006 - machineproject - Tod E. KurtEveryone’s had a little programming experience, right?Who’s had any electrical experience?
What’s for Today• Introduction to Arduino• Building an LED flashlight• Making some blinky LED eyes
Class KitWhat’s in your goodie bag
Class Kit Manifest• Arduino NG USB board• Arduino ProtoShield• Solderless breadboard• USB cable• RC servo• piezo buzzer• 6m hookup wire in ghastlycolors• potentiometer with knob• R,G,B and mystery LEDs• two push switches• 9V battery and connector• 220, 330, 10k, and 1Mresistors• light sensitive resistor• 5.1v zener diode• square of velcro• scary eyeballsAnd other bits as we progressIgnore most of the kit for now, just use Arduino board and USB cableComplete kit manifest with part numbers will be online
A Word on Safety• Electronics are toxic to you• Lead in some of the parts• Wash up afterwards• You are toxic to electronics• Static-sensitive: don’t shuffle your feet• Wires only bend so much
What is Arduino?• Open Source Physical Computing Platform• open source: free to inspect & modify• physical computing. er, what?ubiquitous computing, pervasivecomputing, ambient intelligence, calm computing, everyware, spimes, blogjects, smart objects...• A physical board, a programmingenvironment, a development philosophy• Tiny computer you can program• Completely stand-alone, talks to other devicesPhysical computing as invisible computingCan run off a batteryCan talk to other computers, cell phones, etc.
What is Arduino?• Based on AVR-GCC, avr-libc, AVRlib andProcessing (all open source projects)• Very similar to Basic Stamp (if you know it)• but cheaper, faster, & open• Uses AVR ATmega8 microcontroller chipBasic Stamp uses PIC microcontroller chip.PICs and AVRs are very comparable, one’s not necessarily better than the otherAVRs are a little better if you’re using a language like C (stack-based)Don’t need to worry about the chip particulars for now
What is Arduino?• Why not just use a bare AVR ATmega8 chip?• Arduino is also a standardized “bootloader”• A tiny program that loads other programs• It’s alive during first 5 secondsA bootloader is akin to an BIOS on a real computer. It handles the startup of the chipAfter 5 seconds, your program runsDon’t need special programmer board with a bootloaderArduino can work with other AVR chips, some are smaller than your fingernail, cost ~ 40 cents
What is Arduino?• Capabilities• 8 kBytes of Flash program memory• 1 kByte of RAM• 12 MHz (Apple II: 1 MHz)• Inputs and Outputs• 13 digital input/output pins• 5 analog input pinsDigital I/O can read switches and buttons, control LEDs and motorsAnalog input can read knobs or other varying sensorsAnalog output can be done with PWM
What is Arduino?• Write programs on your PC• Download them into the Arduino board• Arduino board can then be used by itselfBut how do you program it?No keyboard, mouse or displayYour PC becomes the “head”
Arduino Board2”1.7”resetbuttonpowerLEDtestLEDTX/RXLEDsdigital input/outputanalog inputAlso: USB input, power input, ICSP programming header
Arduino Boardanalog inputsresetbuttonpowerLEDtestLEDdigital I/ODiagrammatic version, to simplifyBut of a slightly older version of the board
Digital? Analog?• Digital – only has two values: on/off• Analog – has many (infinite) values• Computers don’t really do analog• So they fake it, with quantizationQuantization = breaking up the analog range into bins. The number of bins is the resolution.More bins = higher accuracy, but is more complexDigital can be thought of as only two bins.
Arduino Softwarecompile(verify)upload to boardstatusareaThat’s the full code for blinking an LED, btw.Arduino defines several useful functions like digitalWrite() and delay(). more on that laterProcessing and Wiring not needed
Arduino & Processinghttp://processing.org/build generative art or other applets easilynot needed for Arduino, but can work with itArduino has essentially the same GUI as ProcessingEasier than Arduino, since all softwareThough similar UI and philosophy, Arduino is a different languageWe’ll use Processing later in the class to let the computer control Arduino & vice-versa
• Download software: http://arduino.cc/• Mac OS X PPC or Intel (must pick)• Windows 2000/XP• Install drivers• In “drivers” folder, pick appropriate one• Windows: unzip driver, plug in board, setup• “macosx-setup-command” for Mac folk• RebootInstalling ArduinoDifferent Arduino downloads for each operating systemDifferent drivers for each OS too“macosx-setup-command” must be run before reboot,but, it will go away in next version
Using Arduino• Programs are called “sketches”• Load up example sketch “led_blink”
ErrorsMust selectserial port“Programmer isnot responding”
What’s my serial port?Windows: Use Device Manager to find COM portMac: It’s called “/dev/tty.usbserial-something”
Using Arduino• Write program• Compile (check for errors)• Reset board• Upload to boardTry it out with “led_blink”!On reset, board will flash on-board pin 13 LED really fast for a split-second to indicate bootloaderexistsWhen uploading, TX/RX lights will flash as data is transferredThen the board resets, pin 13 will flash fast againFinally, your program will run
Arduino Board Lifecycle
Take a Break
Making Circuitsheart pumps, blood flows voltage pushes, current flows
LEDsphysical characteristics schematic symbol• LED = Light-Emitting Diode• electricity only flows one way in a diode• Needs a “current limiting” resistor, or burnsoutbar = minusMany types of integrated lenses.Some project a narrow beam (like the ones in this class), some project a very wide beam
LED flashlightwiring diagram schematicAll LED circuits are essentially this: power source, current limiter, LEDFlat part of LED goes to negative, like bar in schematicThe higher the resistance, the dimmer the LED; the lower, the brighter
LED flashlightTake out solderless breadboard, resistor, LED, and battery and make a circuitLEDs have been marked a little as to what color they are, but color doesn’t matter here
Solderless Breadboardsgroups of 5connectedbut not connectedacross the jump notconnectedInsert wires into holes to make a connection.*Much* easier, quicker than solderingBut, they wear out, are expensive ($8 for this little one)
Using SolderlessBreadboardsUsing needle nose pliers can helpGrab wire or lead toward end and push into hole
Blinky LED circuitwiring diagram schematic“hello world” of microcontrollersIn schematics signals often flow from top-left to bottom-rightCommon nodes like “gnd” are given their own symbolPick any digital pin to hook up to, doesn’t matter which
Blinky LED circuit• Plug shield on top of Arduino board• Stick breadboard to shield
Blinky LED SoftwareYou’ve already seen it.
Arduino SketchStructure• Declare variables at top• Initialize• setup() – run once at beginning, set pins• Running• loop() – run repeatedly, after setup()Pins can be changed in loop() too, but conceptually easier in setup()
Arduino “Language”• Language is standard C (but made easy)• Lots of useful functions• pinMode() – set a pin as input or output• digitalWrite() – set a digital pin high/low• digitalRead() – read a digital pin’s state• analogRead() – read an analog pin• analogWrite() – write an “analog” PWM value• delay() – wait an amount of time• millis() – get the current time• And many others. And libraries. And examples!Also: serial library, LCD library, servo examples
Development Cycle• Make as many changes as you want• Not like most web programming: edit ➝ run• Edit ➝ compile ➝ upload ➝ runeditcompileuploadrun
More Blinky MadnessAdd LEDs
Next Week• Reading buttons• Reading analog values (knobs)• Detecting the dark• More complex LED circuits• Stand-alone Arduino
Tod E. Kurttod@todbot.comEND Class 1
ATmega8 & Arduino

Recommended

PDF
Arduino electronics cookbook
PDF
Apostila arduino
PDF
Presentation S4A
PPTX
Arduino Day 1 Presentation
PPTX
Arduino
PDF
Arduino uno
PDF
2015-10-21 - Arduino workshop
PPTX
Arduino tutorial A to Z
PPTX
What are the different types of arduino boards
PDF
Arduino Lecture 1 - Introducing the Arduino
KEY
Intro to Arduino
PDF
Introduction to Arduino
PPTX
Ardui no
PDF
IOTC08 The Arduino Platform
DOCX
The arduino uno is a microcontroller board based on the
PPTX
Introduction to the Arduino
PPTX
Arduino Workshop Day 2
PPTX
Introduction to arduino
PPTX
Arduino Workshop
DOCX
Arduino Full Tutorial
PDF
Ardublock tutorial
PPTX
Introduction to arduino!
PPTX
Introduction to Arduino Microcontroller
PDF
Intro to Arduino Revision #2
PDF
Arduino Lecture 4 - Interactive Media CS4062 Semester 2 2009
PPTX
Arduino as an embedded industrial controller
PDF
Arduino Workshop Day 1 - Basic Arduino
 
PDF
Arduino: Tutorial de Arduino
PPTX
Designers, please mind the gap! Let's get started with Arduino
PPT
13223971.ppt

More Related Content

PDF
Arduino electronics cookbook
PDF
Apostila arduino
PDF
Presentation S4A
PPTX
Arduino Day 1 Presentation
PPTX
Arduino
PDF
Arduino uno
PDF
2015-10-21 - Arduino workshop
PPTX
Arduino tutorial A to Z
Arduino electronics cookbook
Apostila arduino
Presentation S4A
Arduino Day 1 Presentation
Arduino
Arduino uno
2015-10-21 - Arduino workshop
Arduino tutorial A to Z

What's hot

PPTX
What are the different types of arduino boards
PDF
Arduino Lecture 1 - Introducing the Arduino
KEY
Intro to Arduino
PDF
Introduction to Arduino
PPTX
Ardui no
PDF
IOTC08 The Arduino Platform
DOCX
The arduino uno is a microcontroller board based on the
PPTX
Introduction to the Arduino
PPTX
Arduino Workshop Day 2
PPTX
Introduction to arduino
PPTX
Arduino Workshop
DOCX
Arduino Full Tutorial
PDF
Ardublock tutorial
PPTX
Introduction to arduino!
PPTX
Introduction to Arduino Microcontroller
PDF
Intro to Arduino Revision #2
PDF
Arduino Lecture 4 - Interactive Media CS4062 Semester 2 2009
PPTX
Arduino as an embedded industrial controller
PDF
Arduino Workshop Day 1 - Basic Arduino
 
PDF
Arduino: Tutorial de Arduino
What are the different types of arduino boards
Arduino Lecture 1 - Introducing the Arduino
Intro to Arduino
Introduction to Arduino
Ardui no
IOTC08 The Arduino Platform
The arduino uno is a microcontroller board based on the
Introduction to the Arduino
Arduino Workshop Day 2
Introduction to arduino
Arduino Workshop
Arduino Full Tutorial
Ardublock tutorial
Introduction to arduino!
Introduction to Arduino Microcontroller
Intro to Arduino Revision #2
Arduino Lecture 4 - Interactive Media CS4062 Semester 2 2009
Arduino as an embedded industrial controller
Arduino Workshop Day 1 - Basic Arduino
 
Arduino: Tutorial de Arduino

Similar to Arduino spooky projects_class1

PPTX
Designers, please mind the gap! Let's get started with Arduino
PPT
13223971.ppt
PPT
Intro to Arduino
PDF
Arduino Comic-Jody Culkin-2011
PDF
Arduino comic v0004
PPTX
Introduction To Arduino-converted for s.pptx
 
PDF
02 Sensors and Actuators Understand .pdf
PPTX
Arduino Workshop (3).pptx
PDF
Arduino Development For Beginners
PPTX
Arduino.pptx
PDF
Getting startedwitharduino ch04
PPTX
Arduino Slides With Neopixels
PDF
introductiontoarduino-111120102058-phpapp02.pdf
PPTX
Introduction to Arduino with ArduBlock & SparkFun LilyPad
PPTX
Basic arduino components and more things about arduino
PPTX
Intro_to_Arduino_-_v30.pptx
PPTX
Arduino slides
PPTX
Arduino Workshop Slides
PDF
Arduino_IOT Arduino_IOT Arduino_IOTArdui
Designers, please mind the gap! Let's get started with Arduino
13223971.ppt
Intro to Arduino
Arduino Comic-Jody Culkin-2011
Arduino comic v0004
Introduction To Arduino-converted for s.pptx
 
02 Sensors and Actuators Understand .pdf
Arduino Workshop (3).pptx
Arduino Development For Beginners
Arduino.pptx
Getting startedwitharduino ch04
Arduino Slides With Neopixels
introductiontoarduino-111120102058-phpapp02.pdf
Introduction to Arduino with ArduBlock & SparkFun LilyPad
Basic arduino components and more things about arduino
Intro_to_Arduino_-_v30.pptx
Arduino slides
Arduino Workshop Slides
Arduino_IOT Arduino_IOT Arduino_IOTArdui

Recently uploaded

PPTX
wob-report.pptxwob-report.pptxwob-report.pptx
PDF
Energy Storage Landscape Clean Energy Ministerial
PPTX
cybercrime in Information security .pptx
PDF
Usage Control for Process Discovery through a Trusted Execution Environment
PDF
Day 1 - Cloud Security Strategy and Planning ~ 2nd Sight Lab ~ Cloud Security...
PDF
Our Digital Tribe_ Cultivating Connection and Growth in Our Slack Community 🌿...
PDF
Internet_of_Things_IoT_for_Next_Generation_Smart_Systems_Utilizing.pdf
PDF
Digit Expo 2025 - EICC Edinburgh 27th November
DOCX
Introduction to the World of Computers (Hardware & Software)
PPTX
Cybercrime in the Digital Age: Risks, Impact & Protection
PDF
Vibe Coding vs. Spec-Driven Development [Free Meetup]
PDF
GPUS and How to Program Them by Manya Bansal
PDF
Security Technologys: Access Control, Firewall, VPN
PPTX
Kanban India 2025 | Daksh Gupta | Modeling the Models, Generative AI & Kanban
DOCX
iRobot Post‑Mortem and Alternative Paths - Discussion Document for Boards and...
PDF
Security Forum Sessions from Houston 2025 Event
PPTX
Coded Agents – with UiPath SDK + LangGraph [Virtual Hands-on Workshop]
PDF
Session 1 - Solving Semi-Structured Documents with Document Understanding
PDF
December Patch Tuesday
 
PDF
Day 2 - Network Security ~ 2nd Sight Lab ~ Cloud Security Class ~ 2020
wob-report.pptxwob-report.pptxwob-report.pptx
Energy Storage Landscape Clean Energy Ministerial
cybercrime in Information security .pptx
Usage Control for Process Discovery through a Trusted Execution Environment
Day 1 - Cloud Security Strategy and Planning ~ 2nd Sight Lab ~ Cloud Security...
Our Digital Tribe_ Cultivating Connection and Growth in Our Slack Community 🌿...
Internet_of_Things_IoT_for_Next_Generation_Smart_Systems_Utilizing.pdf
Digit Expo 2025 - EICC Edinburgh 27th November
Introduction to the World of Computers (Hardware & Software)
Cybercrime in the Digital Age: Risks, Impact & Protection
Vibe Coding vs. Spec-Driven Development [Free Meetup]
GPUS and How to Program Them by Manya Bansal
Security Technologys: Access Control, Firewall, VPN
Kanban India 2025 | Daksh Gupta | Modeling the Models, Generative AI & Kanban
iRobot Post‑Mortem and Alternative Paths - Discussion Document for Boards and...
Security Forum Sessions from Houston 2025 Event
Coded Agents – with UiPath SDK + LangGraph [Virtual Hands-on Workshop]
Session 1 - Solving Semi-Structured Documents with Document Understanding
December Patch Tuesday
 
Day 2 - Network Security ~ 2nd Sight Lab ~ Cloud Security Class ~ 2020

Arduino spooky projects_class1

  • 1.
    Spooky ProjectsIntroduction toMicrocontrollers with ArduinoClass 17 Oct 2006 - machineproject - Tod E. KurtEveryone’s had a little programming experience, right?Who’s had any electrical experience?
  • 2.
    What’s for Today•Introduction to Arduino• Building an LED flashlight• Making some blinky LED eyes
  • 3.
    Class KitWhat’s inyour goodie bag
  • 4.
    Class Kit Manifest•Arduino NG USB board• Arduino ProtoShield• Solderless breadboard• USB cable• RC servo• piezo buzzer• 6m hookup wire in ghastlycolors• potentiometer with knob• R,G,B and mystery LEDs• two push switches• 9V battery and connector• 220, 330, 10k, and 1Mresistors• light sensitive resistor• 5.1v zener diode• square of velcro• scary eyeballsAnd other bits as we progressIgnore most of the kit for now, just use Arduino board and USB cableComplete kit manifest with part numbers will be online
  • 5.
    A Word onSafety• Electronics are toxic to you• Lead in some of the parts• Wash up afterwards• You are toxic to electronics• Static-sensitive: don’t shuffle your feet• Wires only bend so much
  • 6.
    What is Arduino?•Open Source Physical Computing Platform• open source: free to inspect & modify• physical computing. er, what?ubiquitous computing, pervasivecomputing, ambient intelligence, calm computing, everyware, spimes, blogjects, smart objects...• A physical board, a programmingenvironment, a development philosophy• Tiny computer you can program• Completely stand-alone, talks to other devicesPhysical computing as invisible computingCan run off a batteryCan talk to other computers, cell phones, etc.
  • 7.
    What is Arduino?•Based on AVR-GCC, avr-libc, AVRlib andProcessing (all open source projects)• Very similar to Basic Stamp (if you know it)• but cheaper, faster, & open• Uses AVR ATmega8 microcontroller chipBasic Stamp uses PIC microcontroller chip.PICs and AVRs are very comparable, one’s not necessarily better than the otherAVRs are a little better if you’re using a language like C (stack-based)Don’t need to worry about the chip particulars for now
  • 8.
    What is Arduino?•Why not just use a bare AVR ATmega8 chip?• Arduino is also a standardized “bootloader”• A tiny program that loads other programs• It’s alive during first 5 secondsA bootloader is akin to an BIOS on a real computer. It handles the startup of the chipAfter 5 seconds, your program runsDon’t need special programmer board with a bootloaderArduino can work with other AVR chips, some are smaller than your fingernail, cost ~ 40 cents
  • 9.
    What is Arduino?•Capabilities• 8 kBytes of Flash program memory• 1 kByte of RAM• 12 MHz (Apple II: 1 MHz)• Inputs and Outputs• 13 digital input/output pins• 5 analog input pinsDigital I/O can read switches and buttons, control LEDs and motorsAnalog input can read knobs or other varying sensorsAnalog output can be done with PWM
  • 10.
    What is Arduino?•Write programs on your PC• Download them into the Arduino board• Arduino board can then be used by itselfBut how do you program it?No keyboard, mouse or displayYour PC becomes the “head”
  • 11.
    Arduino Board2”1.7”resetbuttonpowerLEDtestLEDTX/RXLEDsdigital input/outputanaloginputAlso: USB input, power input, ICSP programming header
  • 12.
    Arduino Boardanalog inputsresetbuttonpowerLEDtestLEDdigitalI/ODiagrammatic version, to simplifyBut of a slightly older version of the board
  • 13.
    Digital? Analog?• Digital– only has two values: on/off• Analog – has many (infinite) values• Computers don’t really do analog• So they fake it, with quantizationQuantization = breaking up the analog range into bins. The number of bins is the resolution.More bins = higher accuracy, but is more complexDigital can be thought of as only two bins.
  • 14.
    Arduino Softwarecompile(verify)upload toboardstatusareaThat’s the full code for blinking an LED, btw.Arduino defines several useful functions like digitalWrite() and delay(). more on that laterProcessing and Wiring not needed
  • 15.
    Arduino & Processinghttp://processing.org/buildgenerative art or other applets easilynot needed for Arduino, but can work with itArduino has essentially the same GUI as ProcessingEasier than Arduino, since all softwareThough similar UI and philosophy, Arduino is a different languageWe’ll use Processing later in the class to let the computer control Arduino & vice-versa
  • 16.
    • Download software:http://arduino.cc/• Mac OS X PPC or Intel (must pick)• Windows 2000/XP• Install drivers• In “drivers” folder, pick appropriate one• Windows: unzip driver, plug in board, setup• “macosx-setup-command” for Mac folk• RebootInstalling ArduinoDifferent Arduino downloads for each operating systemDifferent drivers for each OS too“macosx-setup-command” must be run before reboot,but, it will go away in next version
  • 17.
    Using Arduino• Programsare called “sketches”• Load up example sketch “led_blink”
  • 18.
  • 19.
    What’s my serialport?Windows: Use Device Manager to find COM portMac: It’s called “/dev/tty.usbserial-something”
  • 20.
    Using Arduino• Writeprogram• Compile (check for errors)• Reset board• Upload to boardTry it out with “led_blink”!On reset, board will flash on-board pin 13 LED really fast for a split-second to indicate bootloaderexistsWhen uploading, TX/RX lights will flash as data is transferredThen the board resets, pin 13 will flash fast againFinally, your program will run
  • 21.
  • 22.
  • 23.
    Making Circuitsheart pumps,blood flows voltage pushes, current flows
  • 24.
    LEDsphysical characteristics schematicsymbol• LED = Light-Emitting Diode• electricity only flows one way in a diode• Needs a “current limiting” resistor, or burnsoutbar = minusMany types of integrated lenses.Some project a narrow beam (like the ones in this class), some project a very wide beam
  • 25.
    LED flashlightwiring diagramschematicAll LED circuits are essentially this: power source, current limiter, LEDFlat part of LED goes to negative, like bar in schematicThe higher the resistance, the dimmer the LED; the lower, the brighter
  • 26.
    LED flashlightTake outsolderless breadboard, resistor, LED, and battery and make a circuitLEDs have been marked a little as to what color they are, but color doesn’t matter here
  • 27.
    Solderless Breadboardsgroups of5connectedbut not connectedacross the jump notconnectedInsert wires into holes to make a connection.*Much* easier, quicker than solderingBut, they wear out, are expensive ($8 for this little one)
  • 28.
    Using SolderlessBreadboardsUsing needlenose pliers can helpGrab wire or lead toward end and push into hole
  • 29.
    Blinky LED circuitwiringdiagram schematic“hello world” of microcontrollersIn schematics signals often flow from top-left to bottom-rightCommon nodes like “gnd” are given their own symbolPick any digital pin to hook up to, doesn’t matter which
  • 30.
    Blinky LED circuit•Plug shield on top of Arduino board• Stick breadboard to shield
  • 31.
  • 32.
    Arduino SketchStructure• Declarevariables at top• Initialize• setup() – run once at beginning, set pins• Running• loop() – run repeatedly, after setup()Pins can be changed in loop() too, but conceptually easier in setup()
  • 33.
    Arduino “Language”• Languageis standard C (but made easy)• Lots of useful functions• pinMode() – set a pin as input or output• digitalWrite() – set a digital pin high/low• digitalRead() – read a digital pin’s state• analogRead() – read an analog pin• analogWrite() – write an “analog” PWM value• delay() – wait an amount of time• millis() – get the current time• And many others. And libraries. And examples!Also: serial library, LCD library, servo examples
  • 34.
    Development Cycle• Makeas many changes as you want• Not like most web programming: edit ➝ run• Edit ➝ compile ➝ upload ➝ runeditcompileuploadrun
  • 35.
  • 36.
    Next Week• Readingbuttons• Reading analog values (knobs)• Detecting the dark• More complex LED circuits• Stand-alone Arduino
  • 37.
  • 38.

[8]ページ先頭

©2009-2025 Movatter.jp