Movatterモバイル変換


[0]ホーム

URL:


Uploaded by003AmanPratap
PPT, PDF44 views

Intro_to_Arduino_with_coding_explained.ppt

The document provides an overview of Arduino programming and electronics concepts, including installation, components, and basic principles like Ohm's law and circuit construction. It explains how to operate Arduino boards, offers guidance on coding fundamentals, and outlines various projects such as LED blinking and color mixing. Additionally, it emphasizes practical applications of digital and analog inputs and outputs, aiding artists and hobbyists in creating electronics and interactive projects.

Embed presentation

Download to read offline
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Overview of ClassGetting Started:Installation, Applications and MaterialsElectrical:Components, Ohm's Law, Input and Output, Analog and Digital-----------------------------Programming:Split into groups depending on experienceSerial Communication Basics:Troubleshooting and DebuggingVirtual Prototyping:Schematics and PCB Layout in Fritzing
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Arduino Board“Strong Friend” Created in Ivrea, Italyin 2005 by Massimo Banzi & David CuartiellesOpen Source HardwareProcessorCoding is accessible & transferrable  (C++, Processing, java)
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Arduino…is the go-to gear for artists, hobbyists,students, and anyone with a gadgetrydream.rose out of another formidable challenge:how to teach students to createelectronics, fast.http://spectrum.ieee.org/geek-life/hands-on/the-making-of-arduino
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Getting Started• SW Installation: Arduino (v.1.0+)FritzingSIK Guide CodeDrivers (FTDI)• Materials: SIK GuideAnalog I/O, Digital I/O, Serial,& Fritzing handoutsArduino CheatSheet
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.AnalogINPUTSDigital IOPWM(3, 5, 6, 9, 10, 11)PWR IN USB(to Computer)SCLSDA(I2C Bus)POWER5V / 3.3V / GNDRESET
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.AnalogINPUTSDigital IOPWM(3, 5, 6, 9, 10, 11)PWR IN USB(to Computer)SCLSDA(I2C Bus)POWER5V / 3.3V / GNDRESET
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Go ahead and plug your board in!
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Arduino ShieldsPCB Built Shield Inserted Shield
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Arduino ShieldsMicro SD MP3 Trigger LCD
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.SIK ComponentsPush Button Digital Input Switch - Closesor opens circuitPolarized, needsresistorTrimpotentiometerAnalog Input Variable resistor Also called aTrimpot.Photoresistor Analog Input Light DependentResistor (LDR)Resistance varieswith light.Relay Digital Output Switch driven bya small signalUsed to controllarger voltagesTemp Sensor Analog Input Temp DependentResistorFlex Sensor Analog Input Variable resistorSoft Trimpot Analog Input Variable resistor Careful of shortsRGB LED Dig & AnalogOutput16,777,216different colorsOoh... So pretty.Name Image Type Function Notes
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.SIK Components
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.SIK Components
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.SIK Components
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Electricity  Electronics Basic ConceptReview• Ohms Law• Voltage• Current• Resistance• Using a Multi-meter
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Ohm’s Law
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Electrical PropertiesVoltageV• Defined asthe amountof potentialenergy in acircuit.• Units: Volts (V)CurrentI• The rate ofcharge flowin a circuit.• Units: Amperes(A)ResistanceR
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Current Flow AnalogyHigh Current Low Current
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.WaterTowerVoltage AnalogyMore Energy == Higher Voltage Less Energy == Lower VoltageVWaterTowerV
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Resistance AnalogyBig Pipe == Lower Resistance Small Pipe == Higher ResistanceWaterTowerWaterTowerV
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Continuity – Is it a Circuit?The word “circuit” is derived from the circle. AnElectrical Circuit must have a continuous LOOP fromPower (Vcc) to Ground (GND).Continuity is important to make portions of circuits areconnect. Continuity is the simplest and possibly themost important setting on your multi-meter.Sometimes we call this “ringing out” a circuit.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Measuring Electricity – VoltageVoltage is a measure of potential electricalenergy. A voltage is also called a potentialdifference – it is measured between twopoints in a circuit – across a device.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Measuring Electricity -- CurrentCurrent is the measure of the rate of charge flow. ForElectrical Engineers – we consider this to be themovement of electrons.In order to measure this – you must break the circuit orinsert the meter in-line (series).
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Measuring Electricity -- ResistanceResistance is the measure of how much opposition tocurrent flow is in a circuit.Components should be removed entirely from the circuitto measure resistance. Note the settings on the multi-meter. Make sure that you are set for the appropriaterange.Resistancesettings
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Prototyping CircuitsSolderless BreadboardOne of the most useful tools in an engineer orMaker’s toolkit. The three most importantthings:• A breadboard is easier than soldering• A lot of those little holes are connected, which ones?• Sometimes breadboards break
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.What’s a Breadboard?
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Solderless BreadboardEach row (horiz.) of 5holes are connected.Vertical columns –called power bus areconnected vertically
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Using the Breadboard to built a simplecircuitUse the breadboard towire up a single LEDwith a 330 OhmResistor (Orange-Orange-Brown).Note: the longer leg on theLED is the positive leg andthe shorter leg is thenegative
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Fritzing View of Breadboard CircuitWhat happenswhen you breakthe circuit?What if youwanted to addmore than oneLED?
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Adding control – let’s use the Arduinoand start programming!!!
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Concepts: INPUT vs. OUTPUTReferenced from the perspective of the microcontroller (electrical board).Inputs is a signal / informationgoing into the board.Output is any signal exiting theboard.Almost all systems that use physical computing will havesome form of outputWhat are some examples of Outputs?
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Concepts: INPUT vs. OUTPUTReferenced from the perspective of the microcontroller (electrical board).Inputs is a signal / informationgoing into the board.Output is any signal exiting theboard.Examples: Buttons Switches,Light Sensors, Flex Sensors,Humidity Sensors, TemperatureSensors…Examples: LEDs, DC motor,servo motor, a piezo buzzer,relay, an RGB LED
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Concepts: Analog vs. DigitalMicrocontrollers are digital devices – ON or OFF.Also called – discrete.analog signals are anything that can be a fullrange of values. What are some examples? Moreon this later…5 V0 V5 V0 V
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Open up ArduinoHints:For PC Users 1.Let the installer copyand move the files to theappropriate locations, or2.Create a folder underC:Program Files (x86)called Arduino. Move theentire Arduino programfolder here.For Mac Users 1. Move the Arduinoexecutable to the dockfor ease of access.2. Resist the temptationto run these from yourdesktop.
ArduinoIntegrated Development Environment (IDE)Two required functions /methods / routines:void setup(){// runs once}void loop(){// repeats}error & status messages
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Settings: Tools  Serial PortYour computercommunicates to the Arduinomicrocontroller via a serialport  through a USB-Serialadapter.Check to make sure that thedrivers are properly installed.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Settings: Tools  BoardNext, double-check that the proper board is selected under theToolsBoard menu.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Arduino & Arduino Compatible Boards
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.digitalWrite()analogWrite()digitalRead()if() statements / BooleananalogRead()Serial communicationThis work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.BIG6CONCEPTS
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Let’s get to coding…Project #1 – Blink“Hello World” of Physical ComputingPsuedo-code – how should this work?TurnLED ONWaitTurnLEDOFFWaitRinse &Repeat
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Comments, Comments, CommentsComments are for you – the programmer and yourfriends…or anyone else human that might read yourcode.// this is for single line comments// it’s good to put a description at thetop and before anything ‘tricky’/* this is for multi-line commentsLike this…And this….*/
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.comments
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Three commands to know…pinMode(pin, INPUT/OUTPUT);ex: pinMode(13, OUTPUT);digitalWrite(pin, HIGH/LOW);ex: digitalWrite(13, HIGH);delay(time_ms);ex: delay(2500); // delay of 2.5 sec.// NOTE: -> commands are CASE-sensitive
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Project #1: Wiring DiagramMove the greenwire from thepower bus to pin13 (or any otherDigital I/O pin onthe Arduino board.Image created in Fritzing
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.A few simple challengesLet’s make LED#13 blink!Challenge 1a – blink with a 200 ms secondinterval.Challenge 1b – blink to mimic a heartbeatChallenge 1c – find the fastest blink that thehuman eye can still detect…1 ms delay? 2 ms delay? 3 ms delay???
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Try adding other LEDs
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Programming Concepts: VariablesVariable ScopeGlobal---Function-level
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Programming Concepts: Variable TypesVariable Types:8 bits 16 bits 32 bitsbytecharintunsigned intlongunsigned longfloat
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Fading in and Fading Out(Analog or Digital?)A few pins on the Arduino allow for us tomodify the output to mimic an analogsignal.This is done by a technique called:Pulse Width Modulation (PWM)
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Concepts: Analog vs. DigitalTo create an analog signal, the microcontrolleruses a technique called PWM. By varying the dutycycle, we can mimic an “average” analog voltage.Pulse Width Modulation (PWM)
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.analogWrite(pin, val);pin – refers to the OUTPUT pin(limited to pins 3, 5, 6, 9, 10, 11.)– denoted by a ~ symbolval – 8 bit value (0 – 255).0 => 0V | 255 => 5VProject #2 – FadingIntroducing a new command…
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Move one of your LED pins over to Pin 9In Arduino, open up:File  Examples  01.Basics  Fade
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Fade - Code Review
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Fade - Code Review
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Project# 2 -- FadingChallenge 2a – Change the rate of thefading in and out. There are at least twodifferent ways to do this – can you figurethem out?Challenge 2b – Use 2 (or more) LEDs – sothat one fades in as the other one fadesout.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Color MixingTri-color LEDIn the SIK, this is a standard –Common Cathode LEDThis means the negative side ofthe LED is all tied to Ground.R G B
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Project 3 – RGB LEDNote: The longestleg of the RGBLED is theCommonCathode. Thisgoes to GND.Use pins 5, 6, & 9
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.How many unique colors can you create?Use Colorpicker.com orexperiment on yourown.Pick out a few colors thatyou want to try re-creating for a lamp orlighting display...Play around with this withthe analogWrite()command.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.RGB LED Color Mixingint redPin = 5;int greenPin = 6;int bluePin = 9;void setup(){pinMode(redPin, OUTPUT);pinMode(greenPin, OUTPUT);pinMode(bluePin, OUTPUT);}
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.RGB LED Color Mixingvoid loop(){analogWrite(redPin, 255);analogWrite (greenPin, 255);analogWrite (bluePin, 255);}
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Project: Mood Lamp / Light Sculpture
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.NapkinSchematicsEmphasize theengineering designprocess withstudents. We like toskirt the linebetween formal andinformal with a toolcalled NapkinSchematics.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.NapkinSchematicsEmphasize theengineering designprocess withstudents. We like toskirt the linebetween formal andinformal with a toolcalled NapkinSchematics.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Driving Motors or other High CurrentLoadsNPN Transistor (Common Emitter “Amplifier” Circuit)to DigitalPin 9
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.InputInput is any signal entering an electrical system.• Both digital and analog sensors are forms of input• Input can also take many other forms: Keyboards, amouse, infrared sensors, biometric sensors, or justplain voltage from a circuit
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Project #4 – Digital InputIn Arduino, open up:File  Examples  02.Digital  Button
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Digital Sensors (a.k.a. Switches)Pull-up Resistor (circuit)to Digital Pin 2
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Digital Sensors (a.k.a. Switches)Add an indicator LED to Pin 13This is just like our1st circuit!
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Digital Input• Connect digital input to your Arduino using Pins # 0 – 13(Although pins # 0 & 1 are also used for programming)• Digital Input needs a pinMode command:pinMode (pinNumber, INPUT);Make sure to use ALL CAPS for INPUT• To get a digital reading:int buttonState = digitalRead (pinNumber);• Digital Input values are only HIGH (On) or LOW (Off)
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Digital Sensors• Digital sensors are more straight forward than Analog• No matter what the sensor there are only twosettings: On and Off• Signal is always either HIGH (On) or LOW (Off)• Voltage signal for HIGH will be a little less than 5V onyour Uno• Voltage signal for LOW will be 0V on most systems
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.http://opensourcehardwarejunkies.com/tutorial-03-digitalread-and-
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Programming: Conditional Statementsif()
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.void loop(){int buttonState = digitalRead(5);if(buttonState == LOW){ // do something}else{ // do something else}}Programming: Conditional Statementsif()DIGINPUT
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Boolean Operators<Boolean> Description( ) == ( ) is equal?( ) != ( ) is not equal?( ) > ( ) greater than( ) >= ( ) greater than or equal( ) < ( ) less than( ) <= ( ) less than or equal
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Trimpot (Potentiometer)Variable Resistorwiperfixedendfixedend
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Analog Sensors3 Pin Potentiometer = var. resistor (circuit)a.k.a. Voltage Divider Circuit1.0 V 1.0 Vwiperfixedends
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Ohms Law… (just the basics)Actually, this is the “voltage divider”
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.analogRead()Arduino uses a 10-bit A/D Converter:• this means that you get input values from0 to 1023• 0 V  0• 5 V  1023Ex:int sensorValue = analogRead(A0);
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Using Serial CommunicationMethod used to transfer data between two devices.Arduino dedicates Digital I/O pin # 0 toreceiving and Digital I/O pin #1 to transmit.Data passes between the computer and Arduinothrough the USB cable. Data is transmitted as zeros(‘0’) and ones (‘1’) sequentially.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Serial Monitor & analogRead()Initializes the SerialCommunication9600 baud data rateprints data to serial bus
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Serial Monitor & analogRead()Opens up aSerial TerminalWindow
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Analog Sensors2 Pin Analog Sensors = var. resistorTake two sensors -- Usethe Serial Monitor and findthe range of input valuesyou get for each sensor.MaxAnalogRead = _________MinAnalogRead = _________
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Analog SensorsExamples:Sensors VariablesMic soundVolumePhotoresistor lightLevelPotentiometer dialPositionTemp Sensor temperatureFlex Sensor bendAccelerometer tilt/acceleration
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Additional Serial CommunicationSending a Messagevoid loop ( ){Serial.print(“Hands on “) ;Serial.print(“Learning ”) ;Serial.println(“is Fun!!!”) ;}
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Serial Communication:Serial Debuggingvoid loop(){int xVar = 10;Serial.print ( “Variable xVar is “ ) ;Serial.println ( xVar ) ;}
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Serial Communication:Serial Troubleshootingvoid loop ( ){Serial.print (“Digital pin 9: “);Serial.println (digitalRead(9));}
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Virtual Electrical Prototyping Projectstarted in 2007 by the Interaction Design Labat the University of Applied Science Potsdam, GermanyOpen SourcePrototypes: Document, Share, Teach, Manufacture
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Now that you feel comfortable putting togethercircuits with your breadboard let’s talk about howto go from the breadboard to a PCB
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Free TimeThe rest of the class is dedicated to free pursuitExperiment with the various circuits and lessons inthe SIK.Explore the additional tutorials available onlearn.sparkfun.comThank you for attending our Intro to Arduino class

Recommended

PPT
Introduction to Arduino and Internet of Things
PPT
Intro_to_Arduino introductionn_-_v30.ppt
PPT
introduciotn to arduino is very important
PDF
Intro_to_Arduino_-_v30_1.pdf
PPT
Introduction to Arduino Version 3 Zero to Prototyping
PPT
IntrotoArduino.ppt
PPT
Intro_to_Arduino_-_v30dadasdadadadaasda.ppt
PDF
Intro_to_AFrduinoFFFFFFFFFFF_-_v30_1.pdf
PPTX
Intro_to_Arduino_Full_ppt_with_examples_and_excersices
PPT
Introductory level to Arduino programming
PPT
Arduino Introduction.ppt
PPT
Arduino uno basics with pin diagram program
PDF
Arduino Workshop Day 1 - Basic Arduino
 
PPT
Arduino basics presenation - basics to .
PPT
computer_programming for grade 12 learners
PPTX
Intro to Arduino.ppt
PPT
Intro to Arduino
PPTX
embedded_in_Arduino_with_basic_embedded.pptx
PPT
ArduinoSectionI-slides.ppt
KEY
Intro to Arduino
PPT
Intro_to_Arduino_-_v30.ppt
PPT
Intro_to_Arduino_-_v30 (3).ppt
PPT
Intro to arduino
PPT
IntrotoArduino.ppt
PPT
Intro_to_Arduino_v31_a_workshop_for_beginners
PPTX
Intro_to_Arduino_-_v30.pptx
PPTX
Basic arduino components and more things about arduino
PDF
Making things sense - Day 1 (May 2011)
PDF
Albert Pintoy - Specializing In Low-Latency
PPTX
firewall Selection in production life pptx

More Related Content

PPT
Introduction to Arduino and Internet of Things
PPT
Intro_to_Arduino introductionn_-_v30.ppt
PPT
introduciotn to arduino is very important
PDF
Intro_to_Arduino_-_v30_1.pdf
PPT
Introduction to Arduino Version 3 Zero to Prototyping
PPT
IntrotoArduino.ppt
PPT
Intro_to_Arduino_-_v30dadasdadadadaasda.ppt
PDF
Intro_to_AFrduinoFFFFFFFFFFF_-_v30_1.pdf
Introduction to Arduino and Internet of Things
Intro_to_Arduino introductionn_-_v30.ppt
introduciotn to arduino is very important
Intro_to_Arduino_-_v30_1.pdf
Introduction to Arduino Version 3 Zero to Prototyping
IntrotoArduino.ppt
Intro_to_Arduino_-_v30dadasdadadadaasda.ppt
Intro_to_AFrduinoFFFFFFFFFFF_-_v30_1.pdf

Similar to Intro_to_Arduino_with_coding_explained.ppt

PPTX
Intro_to_Arduino_Full_ppt_with_examples_and_excersices
PPT
Introductory level to Arduino programming
PPT
Arduino Introduction.ppt
PPT
Arduino uno basics with pin diagram program
PDF
Arduino Workshop Day 1 - Basic Arduino
 
PPT
Arduino basics presenation - basics to .
PPT
computer_programming for grade 12 learners
PPTX
Intro to Arduino.ppt
PPT
Intro to Arduino
PPTX
embedded_in_Arduino_with_basic_embedded.pptx
PPT
ArduinoSectionI-slides.ppt
KEY
Intro to Arduino
PPT
Intro_to_Arduino_-_v30.ppt
PPT
Intro_to_Arduino_-_v30 (3).ppt
PPT
Intro to arduino
PPT
IntrotoArduino.ppt
PPT
Intro_to_Arduino_v31_a_workshop_for_beginners
PPTX
Intro_to_Arduino_-_v30.pptx
PPTX
Basic arduino components and more things about arduino
PDF
Making things sense - Day 1 (May 2011)
Intro_to_Arduino_Full_ppt_with_examples_and_excersices
Introductory level to Arduino programming
Arduino Introduction.ppt
Arduino uno basics with pin diagram program
Arduino Workshop Day 1 - Basic Arduino
 
Arduino basics presenation - basics to .
computer_programming for grade 12 learners
Intro to Arduino.ppt
Intro to Arduino
embedded_in_Arduino_with_basic_embedded.pptx
ArduinoSectionI-slides.ppt
Intro to Arduino
Intro_to_Arduino_-_v30.ppt
Intro_to_Arduino_-_v30 (3).ppt
Intro to arduino
IntrotoArduino.ppt
Intro_to_Arduino_v31_a_workshop_for_beginners
Intro_to_Arduino_-_v30.pptx
Basic arduino components and more things about arduino
Making things sense - Day 1 (May 2011)

Recently uploaded

PDF
Albert Pintoy - Specializing In Low-Latency
PPTX
firewall Selection in production life pptx
PPTX
UnrealGameplayAbilitySystemPresentation.pptx
PPTX
Emerging Trends and Research Frontiers in Chemical Engineering for Green and ...
PDF
Surveillance_Partner_Product_Training_20240120_KSA.pdf
PPTX
Salesforce Bulk Connector V1 and V2 Deep Dive!
PPT
Software Engineering Unit-1 presentation for students
PPTX
Optimizing Plant Maintenance — Key Elements of a Successful Maintenance Plan ...
PPTX
Cloud vs On-Premises CMMS — Which Maintenance Platform Is Better for Your Plant?
PPTX
Takt Time vs Cycle Time vs Lead Time.pptx
PDF
Enhancing Distributed Authorization with Lagrange Interpolation and Attribute...
PPTX
Step-by-step guide to designing standard a microbiology laboratory in pharmac...
PPTX
Vertical turbine pump explains installed in power plants
PPTX
ISO 14224 Compliance & CMMS Software — A Comprehensive Guide for Reliable Mai...
PPTX
Shutdown Maintenance Explained — Full Plant Turnaround & Best Practices with ...
PPTX
How to Create an Effective Monthly Maintenance Plan for Reliable Plant Operat...
PPTX
Role of In Vitro and In Vivo Testing biomedical engineering
PPTX
Data Science with R Final yrUnit II.pptx
PPTX
22304_BCO_CO3_LO4_PPT MSBTE Building construction.pptx
PPTX
How to Implement Kaizen in Your Organization for Continuous Improvement Success
Albert Pintoy - Specializing In Low-Latency
firewall Selection in production life pptx
UnrealGameplayAbilitySystemPresentation.pptx
Emerging Trends and Research Frontiers in Chemical Engineering for Green and ...
Surveillance_Partner_Product_Training_20240120_KSA.pdf
Salesforce Bulk Connector V1 and V2 Deep Dive!
Software Engineering Unit-1 presentation for students
Optimizing Plant Maintenance — Key Elements of a Successful Maintenance Plan ...
Cloud vs On-Premises CMMS — Which Maintenance Platform Is Better for Your Plant?
Takt Time vs Cycle Time vs Lead Time.pptx
Enhancing Distributed Authorization with Lagrange Interpolation and Attribute...
Step-by-step guide to designing standard a microbiology laboratory in pharmac...
Vertical turbine pump explains installed in power plants
ISO 14224 Compliance & CMMS Software — A Comprehensive Guide for Reliable Mai...
Shutdown Maintenance Explained — Full Plant Turnaround & Best Practices with ...
How to Create an Effective Monthly Maintenance Plan for Reliable Plant Operat...
Role of In Vitro and In Vivo Testing biomedical engineering
Data Science with R Final yrUnit II.pptx
22304_BCO_CO3_LO4_PPT MSBTE Building construction.pptx
How to Implement Kaizen in Your Organization for Continuous Improvement Success

Intro_to_Arduino_with_coding_explained.ppt

  • 1.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Overview of ClassGetting Started:Installation, Applications and MaterialsElectrical:Components, Ohm's Law, Input and Output, Analog and Digital-----------------------------Programming:Split into groups depending on experienceSerial Communication Basics:Troubleshooting and DebuggingVirtual Prototyping:Schematics and PCB Layout in Fritzing
  • 2.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Arduino Board“Strong Friend” Created in Ivrea, Italyin 2005 by Massimo Banzi & David CuartiellesOpen Source HardwareProcessorCoding is accessible & transferrable  (C++, Processing, java)
  • 3.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Arduino…is the go-to gear for artists, hobbyists,students, and anyone with a gadgetrydream.rose out of another formidable challenge:how to teach students to createelectronics, fast.http://spectrum.ieee.org/geek-life/hands-on/the-making-of-arduino
  • 4.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Getting Started• SW Installation: Arduino (v.1.0+)FritzingSIK Guide CodeDrivers (FTDI)• Materials: SIK GuideAnalog I/O, Digital I/O, Serial,& Fritzing handoutsArduino CheatSheet
  • 5.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.AnalogINPUTSDigital IOPWM(3, 5, 6, 9, 10, 11)PWR IN USB(to Computer)SCLSDA(I2C Bus)POWER5V / 3.3V / GNDRESET
  • 6.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.AnalogINPUTSDigital IOPWM(3, 5, 6, 9, 10, 11)PWR IN USB(to Computer)SCLSDA(I2C Bus)POWER5V / 3.3V / GNDRESET
  • 7.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Go ahead and plug your board in!
  • 8.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Arduino ShieldsPCB Built Shield Inserted Shield
  • 9.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Arduino ShieldsMicro SD MP3 Trigger LCD
  • 10.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.SIK ComponentsPush Button Digital Input Switch - Closesor opens circuitPolarized, needsresistorTrimpotentiometerAnalog Input Variable resistor Also called aTrimpot.Photoresistor Analog Input Light DependentResistor (LDR)Resistance varieswith light.Relay Digital Output Switch driven bya small signalUsed to controllarger voltagesTemp Sensor Analog Input Temp DependentResistorFlex Sensor Analog Input Variable resistorSoft Trimpot Analog Input Variable resistor Careful of shortsRGB LED Dig & AnalogOutput16,777,216different colorsOoh... So pretty.Name Image Type Function Notes
  • 11.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.SIK Components
  • 12.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.SIK Components
  • 13.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.SIK Components
  • 14.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.
  • 15.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Electricity Electronics Basic ConceptReview• Ohms Law• Voltage• Current• Resistance• Using a Multi-meter
  • 16.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Ohm’s Law
  • 17.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Electrical PropertiesVoltageV• Defined asthe amountof potentialenergy in acircuit.• Units: Volts (V)CurrentI• The rate ofcharge flowin a circuit.• Units: Amperes(A)ResistanceR
  • 18.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Current Flow AnalogyHigh Current Low Current
  • 19.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.WaterTowerVoltage AnalogyMore Energy == Higher Voltage Less Energy == Lower VoltageVWaterTowerV
  • 20.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Resistance AnalogyBig Pipe == Lower Resistance Small Pipe == Higher ResistanceWaterTowerWaterTowerV
  • 21.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Continuity – Is it a Circuit?The word “circuit” is derived from the circle. AnElectrical Circuit must have a continuous LOOP fromPower (Vcc) to Ground (GND).Continuity is important to make portions of circuits areconnect. Continuity is the simplest and possibly themost important setting on your multi-meter.Sometimes we call this “ringing out” a circuit.
  • 22.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Measuring Electricity – VoltageVoltage is a measure of potential electricalenergy. A voltage is also called a potentialdifference – it is measured between twopoints in a circuit – across a device.
  • 23.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Measuring Electricity -- CurrentCurrent is the measure of the rate of charge flow. ForElectrical Engineers – we consider this to be themovement of electrons.In order to measure this – you must break the circuit orinsert the meter in-line (series).
  • 24.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Measuring Electricity -- ResistanceResistance is the measure of how much opposition tocurrent flow is in a circuit.Components should be removed entirely from the circuitto measure resistance. Note the settings on the multi-meter. Make sure that you are set for the appropriaterange.Resistancesettings
  • 25.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Prototyping CircuitsSolderless BreadboardOne of the most useful tools in an engineer orMaker’s toolkit. The three most importantthings:• A breadboard is easier than soldering• A lot of those little holes are connected, which ones?• Sometimes breadboards break
  • 26.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.What’s a Breadboard?
  • 27.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Solderless BreadboardEach row (horiz.) of 5holes are connected.Vertical columns –called power bus areconnected vertically
  • 28.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Using the Breadboard to built a simplecircuitUse the breadboard towire up a single LEDwith a 330 OhmResistor (Orange-Orange-Brown).Note: the longer leg on theLED is the positive leg andthe shorter leg is thenegative
  • 29.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Fritzing View of Breadboard CircuitWhat happenswhen you breakthe circuit?What if youwanted to addmore than oneLED?
  • 30.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Adding control – let’s use the Arduinoand start programming!!!
  • 31.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Concepts: INPUT vs. OUTPUTReferenced from the perspective of the microcontroller (electrical board).Inputs is a signal / informationgoing into the board.Output is any signal exiting theboard.Almost all systems that use physical computing will havesome form of outputWhat are some examples of Outputs?
  • 32.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Concepts: INPUT vs. OUTPUTReferenced from the perspective of the microcontroller (electrical board).Inputs is a signal / informationgoing into the board.Output is any signal exiting theboard.Examples: Buttons Switches,Light Sensors, Flex Sensors,Humidity Sensors, TemperatureSensors…Examples: LEDs, DC motor,servo motor, a piezo buzzer,relay, an RGB LED
  • 33.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Concepts: Analog vs. DigitalMicrocontrollers are digital devices – ON or OFF.Also called – discrete.analog signals are anything that can be a fullrange of values. What are some examples? Moreon this later…5 V0 V5 V0 V
  • 34.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Open up ArduinoHints:For PC Users 1.Let the installer copyand move the files to theappropriate locations, or2.Create a folder underC:Program Files (x86)called Arduino. Move theentire Arduino programfolder here.For Mac Users 1. Move the Arduinoexecutable to the dockfor ease of access.2. Resist the temptationto run these from yourdesktop.
  • 35.
    ArduinoIntegrated Development Environment(IDE)Two required functions /methods / routines:void setup(){// runs once}void loop(){// repeats}error & status messages
  • 36.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Settings: Tools  Serial PortYour computercommunicates to the Arduinomicrocontroller via a serialport  through a USB-Serialadapter.Check to make sure that thedrivers are properly installed.
  • 37.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Settings: Tools  BoardNext, double-check that the proper board is selected under theToolsBoard menu.
  • 38.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Arduino & Arduino Compatible Boards
  • 39.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.digitalWrite()analogWrite()digitalRead()if() statements / BooleananalogRead()Serial communicationThis work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.BIG6CONCEPTS
  • 40.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Let’s get to coding…Project #1 – Blink“Hello World” of Physical ComputingPsuedo-code – how should this work?TurnLED ONWaitTurnLEDOFFWaitRinse &Repeat
  • 41.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Comments, Comments, CommentsComments are for you – the programmer and yourfriends…or anyone else human that might read yourcode.// this is for single line comments// it’s good to put a description at thetop and before anything ‘tricky’/* this is for multi-line commentsLike this…And this….*/
  • 42.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.comments
  • 43.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Three commands to know…pinMode(pin, INPUT/OUTPUT);ex: pinMode(13, OUTPUT);digitalWrite(pin, HIGH/LOW);ex: digitalWrite(13, HIGH);delay(time_ms);ex: delay(2500); // delay of 2.5 sec.// NOTE: -> commands are CASE-sensitive
  • 44.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Project #1: Wiring DiagramMove the greenwire from thepower bus to pin13 (or any otherDigital I/O pin onthe Arduino board.Image created in Fritzing
  • 45.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.A few simple challengesLet’s make LED#13 blink!Challenge 1a – blink with a 200 ms secondinterval.Challenge 1b – blink to mimic a heartbeatChallenge 1c – find the fastest blink that thehuman eye can still detect…1 ms delay? 2 ms delay? 3 ms delay???
  • 46.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Try adding other LEDs
  • 47.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Programming Concepts: VariablesVariable ScopeGlobal---Function-level
  • 48.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Programming Concepts: Variable TypesVariable Types:8 bits 16 bits 32 bitsbytecharintunsigned intlongunsigned longfloat
  • 49.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Fading in and Fading Out(Analog or Digital?)A few pins on the Arduino allow for us tomodify the output to mimic an analogsignal.This is done by a technique called:Pulse Width Modulation (PWM)
  • 50.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Concepts: Analog vs. DigitalTo create an analog signal, the microcontrolleruses a technique called PWM. By varying the dutycycle, we can mimic an “average” analog voltage.Pulse Width Modulation (PWM)
  • 51.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.analogWrite(pin, val);pin – refers to the OUTPUT pin(limited to pins 3, 5, 6, 9, 10, 11.)– denoted by a ~ symbolval – 8 bit value (0 – 255).0 => 0V | 255 => 5VProject #2 – FadingIntroducing a new command…
  • 52.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Move one of your LED pins over to Pin 9In Arduino, open up:File  Examples  01.Basics  Fade
  • 53.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Fade - Code Review
  • 54.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Fade - Code Review
  • 55.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Project# 2 -- FadingChallenge 2a – Change the rate of thefading in and out. There are at least twodifferent ways to do this – can you figurethem out?Challenge 2b – Use 2 (or more) LEDs – sothat one fades in as the other one fadesout.
  • 56.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Color MixingTri-color LEDIn the SIK, this is a standard –Common Cathode LEDThis means the negative side ofthe LED is all tied to Ground.R G B
  • 57.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Project 3 – RGB LEDNote: The longestleg of the RGBLED is theCommonCathode. Thisgoes to GND.Use pins 5, 6, & 9
  • 58.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.How many unique colors can you create?Use Colorpicker.com orexperiment on yourown.Pick out a few colors thatyou want to try re-creating for a lamp orlighting display...Play around with this withthe analogWrite()command.
  • 59.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.RGB LED Color Mixingint redPin = 5;int greenPin = 6;int bluePin = 9;void setup(){pinMode(redPin, OUTPUT);pinMode(greenPin, OUTPUT);pinMode(bluePin, OUTPUT);}
  • 60.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.RGB LED Color Mixingvoid loop(){analogWrite(redPin, 255);analogWrite (greenPin, 255);analogWrite (bluePin, 255);}
  • 61.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Project: Mood Lamp / Light Sculpture
  • 62.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.NapkinSchematicsEmphasize theengineering designprocess withstudents. We like toskirt the linebetween formal andinformal with a toolcalled NapkinSchematics.
  • 63.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.NapkinSchematicsEmphasize theengineering designprocess withstudents. We like toskirt the linebetween formal andinformal with a toolcalled NapkinSchematics.
  • 64.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Driving Motors or other High CurrentLoadsNPN Transistor (Common Emitter “Amplifier” Circuit)to DigitalPin 9
  • 65.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.InputInput is any signal entering an electrical system.• Both digital and analog sensors are forms of input• Input can also take many other forms: Keyboards, amouse, infrared sensors, biometric sensors, or justplain voltage from a circuit
  • 66.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Project #4 – Digital InputIn Arduino, open up:File  Examples  02.Digital  Button
  • 67.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Digital Sensors (a.k.a. Switches)Pull-up Resistor (circuit)to Digital Pin 2
  • 68.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Digital Sensors (a.k.a. Switches)Add an indicator LED to Pin 13This is just like our1st circuit!
  • 69.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Digital Input• Connect digital input to your Arduino using Pins # 0 – 13(Although pins # 0 & 1 are also used for programming)• Digital Input needs a pinMode command:pinMode (pinNumber, INPUT);Make sure to use ALL CAPS for INPUT• To get a digital reading:int buttonState = digitalRead (pinNumber);• Digital Input values are only HIGH (On) or LOW (Off)
  • 70.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Digital Sensors• Digital sensors are more straight forward than Analog• No matter what the sensor there are only twosettings: On and Off• Signal is always either HIGH (On) or LOW (Off)• Voltage signal for HIGH will be a little less than 5V onyour Uno• Voltage signal for LOW will be 0V on most systems
  • 71.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.http://opensourcehardwarejunkies.com/tutorial-03-digitalread-and-
  • 72.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Programming: Conditional Statementsif()
  • 73.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.void loop(){int buttonState = digitalRead(5);if(buttonState == LOW){ // do something}else{ // do something else}}Programming: Conditional Statementsif()DIGINPUT
  • 74.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Boolean Operators<Boolean> Description( ) == ( ) is equal?( ) != ( ) is not equal?( ) > ( ) greater than( ) >= ( ) greater than or equal( ) < ( ) less than( ) <= ( ) less than or equal
  • 75.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Trimpot (Potentiometer)Variable Resistorwiperfixedendfixedend
  • 76.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Analog Sensors3 Pin Potentiometer = var. resistor (circuit)a.k.a. Voltage Divider Circuit1.0 V 1.0 Vwiperfixedends
  • 77.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Ohms Law… (just the basics)Actually, this is the “voltage divider”
  • 78.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.analogRead()Arduino uses a 10-bit A/D Converter:• this means that you get input values from0 to 1023• 0 V  0• 5 V  1023Ex:int sensorValue = analogRead(A0);
  • 79.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Using Serial CommunicationMethod used to transfer data between two devices.Arduino dedicates Digital I/O pin # 0 toreceiving and Digital I/O pin #1 to transmit.Data passes between the computer and Arduinothrough the USB cable. Data is transmitted as zeros(‘0’) and ones (‘1’) sequentially.
  • 80.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Serial Monitor & analogRead()Initializes the SerialCommunication9600 baud data rateprints data to serial bus
  • 81.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Serial Monitor & analogRead()Opens up aSerial TerminalWindow
  • 82.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Analog Sensors2 Pin Analog Sensors = var. resistorTake two sensors -- Usethe Serial Monitor and findthe range of input valuesyou get for each sensor.MaxAnalogRead = _________MinAnalogRead = _________
  • 83.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Analog SensorsExamples:Sensors VariablesMic soundVolumePhotoresistor lightLevelPotentiometer dialPositionTemp Sensor temperatureFlex Sensor bendAccelerometer tilt/acceleration
  • 84.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Additional Serial CommunicationSending a Messagevoid loop ( ){Serial.print(“Hands on “) ;Serial.print(“Learning ”) ;Serial.println(“is Fun!!!”) ;}
  • 85.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.
  • 86.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Serial Communication:Serial Debuggingvoid loop(){int xVar = 10;Serial.print ( “Variable xVar is “ ) ;Serial.println ( xVar ) ;}
  • 87.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Serial Communication:Serial Troubleshootingvoid loop ( ){Serial.print (“Digital pin 9: “);Serial.println (digitalRead(9));}
  • 88.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Virtual Electrical Prototyping Projectstarted in 2007 by the Interaction Design Labat the University of Applied Science Potsdam, GermanyOpen SourcePrototypes: Document, Share, Teach, Manufacture
  • 89.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Now that you feel comfortable putting togethercircuits with your breadboard let’s talk about howto go from the breadboard to a PCB
  • 90.
    This work islicensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.Free TimeThe rest of the class is dedicated to free pursuitExperiment with the various circuits and lessons inthe SIK.Explore the additional tutorials available onlearn.sparkfun.comThank you for attending our Intro to Arduino class

[8]ページ先頭

©2009-2025 Movatter.jp