Movatterモバイル変換


[0]ホーム

URL:


Audiomas Soni, profile picture
Uploaded byAudiomas Soni
PPT, PDF748 views

Arduino technical session 1

The document provides information about the Arduino programming environment and hardware options. It discusses downloading the Arduino software, installing drivers, and an overview of the Arduino UNO board. It also lists several Arduino board options, shields that can expand functionality, components needed for projects like enclosures, power supplies, batteries, and various cables and breadboards.

Embed presentation

Downloaded 68 times
1Arduino Board: Arduino UNOArduino Programing Environment: Arduino 0022Download @ http://arduino.cc/en/Main/Software.
2*Download Arduino Software from Arduino.cc and unzip the folder to your computer. Afile within the folder called Arduino, allows you to launch the programming environment.*You need to install a driver that comes with Arduino to be able to communicate withthe board
3USB7-12 v3 vGRD5 vAnalog Input PinsDigital Input/Output PinsPins with ~ are PWM[Analog Output]GRDTransmitter/ReceiverSerial ConnectionMicrocontroller ATmega328Operating Voltage 5VInput Voltage (recommended)7-12VInput Voltage (limits)6-20VDigital I/O Pins 14(of which 6 provide PWM output)Analog Input Pins 6DC Current per I/O Pin 40 mADC Current for 3.3V Pin 50 mA
4
5
6
Other Hardware Choices-BoardsArduino BTThe Arduino BT is an Arduino board with built-in bluetooth module,allowing for wireless communication.LilyPad ArduinoThe LilyPad Arduino is a microcontroller board designed for wearablesand e-textiles. It can be sewn to fabric and similarly mounted powersupplies, sensors and actuators with conductive thread.Arduino NanoArduino Nano is a surface mount breadboard embedded version withintegrated USB. It is a smallest, complete, and breadboard friendly. Ithas everything that Diecimila has (electrically) with more analog inputpins and onboard +5V AREF jumper.7
Other Hardware Choices-SheildsXbee ShieldThe Xbee shield allows an Arduino board to communicate wirelessly using Zigbee. The module cancommunicate up to 100 feet indoors or 300 feet outdoors (with line-of-sight). It can be used as aserial/usb replacement or you can put it into a command mode and configure it for a variety ofbroadcast and mesh networking options.The Xbee shield was created in collaboration with Libelium, who developed it for use in their SquidBeemotes (used for creating sensor networks).Adafruit Servo/Stepper/DC Motor shieldA shield that can control 2 hobby servos and up to 2 unipolar/bipolar stepper motors or 4 bi-directionalDC motors.Battery ShieldA shield from Liquidware that connects to the back of the Arduino, with a USB-rechargable lithium ionbattery that can power an Arduino for 14-28 hours depending on the circuitLiquidware TouchShieldOLED touch screen shield.Adafruit Wave shieldPlays any size 22KHz audio files from an SD memory card for music, effects and interactive sound artAdafruit GPS & Datalogging shieldConnects up a GPS module and can log location, time/date as well as sensor data to an SD memoryflash card.Adafruit XPort/Ethernet shieldAllows use of an XPort module for connecting to the Internet as a client or server. 8
Other Hardware Choices-SheildsAdafruit GPS & Datalogging shieldConnects up a GPS module and can log location,time/date as well as sensor data to an SD memoryflash card.Adafruit XPort/Ethernet shieldAllows use of an XPort module for connecting to theInternet as a client or server.http://ladyada.net9
Other Hardware Choices-SheildsLiquidware TouchShieldOLED touch screen shield.http://www.liquidware.comAdafruit Servo/Stepper/DC Motor shieldA shield that can control 2 hobby servos and up to 2unipolar/bipolar stepper motors or 4 bi-directionalDC motors.http://ladyada.net10
USB Cable A to B - 6 and 10 Feet/ USB miniB Cable - 6 FootThis USB Cable type is the one that allows for connecting normal Arduino Boards to the computer. They come in black and white and in various lengths. ForArduino Mini Pro and Lilypad you need USB miniB for connecting to computer.http://www.sparkfun.com/commerce/product_info.php?products_id=512http://www.sparkfun.com/commerce/product_info.php?products_id=513http://www.sparkfun.com/commerce/product_info.php?products_id=598
USB Cable Extension - 6 Foot/ USB Cable A to A - 6 and 10 FootThese extension cables have a type A male connector on one end that plugs into any computer. The opposing end has a female type A connector allowing asecond USB cable to be inserted. This allows as many cables to be daisy chained together as needed. May come in White or Black, and in 6 feet. For moreextension you can combine USB cable extension with a USB A to A cable.http://www.sparkfun.com/commerce/product_info.php?products_id=517http://www.sparkfun.com/commerce/product_info.php?products_id=516http://www.sparkfun.com/commerce/product_info.php?products_id=515
Arduino BoardsThis is the new Arduino Uno. In addition to all the features of the previous board, the Uno now uses an ATmega8U2 instead of the FTDI chip. This allows forfaster transfer rates, no drivers needed for Linux or Mac (inf file for Windows is needed), and the ability to have the Uno show up as a keyboard, mouse,joystick, etc.The Arduino Mega is a microcontroller board based on the ATmega2560. It has 54 digital input/output pins (of which 14 can be used as PWM outputs), 16analog inputs, 4 UARTs (hardware serial ports), a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. It containseverything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started.The Mega is compatible with most shields designed for the Arduino Duemilanove or Diecimila. This is the new Arduino Mega 2560. In addition to all the featuresof the previous board, the Mega 2560 now uses an ATmega8U2 instead of the FTDI chip. This allows for faster transfer rates, no drivers needed for Linux orMac (inf file for Windows is needed), and the ability to have the board show up as a keyboard, mouse, joystick, etc. It also has twice as much flash memory.Other variaitions of arduino are Arduino pro, Arduino Mini Pro and Lilypad Arduino .http://www.sparkfun.com/commerce/product_info.php?products_id=9950http://www.sparkfun.com/commerce/product_info.php?products_id=9949http://www.sparkfun.com/commerce/tutorial_info.php?tutorials_id=148
Arduino Project Enclosure/ Crib for Arduino - Metal EnclosureThe Arduino enclosure allows you to easily enclose your Arduino main board, Arduino Mega, or any other board that fits the Arduino foot print (FEZ Domino,FEZ Panda, Netduino, etc). It simply presses shut, so you don't have to worry about screws or fasteners. It has room internally for an Arduino and a shield. Iteven has a removable tab mated for use with an Ethernet shield. It also has a snap-in compartment in the back for accessing switches or connections or batteryaccess.Made from sturdy, lightweight powder-coated aluminum, the Crib for Arduino can accommodate either an Arduino Duemilanove or Arduino Mega with headroom to spare for a shield like an Ethernet shield. This enclosure weighs only 5.6 oz (159 g) and is structurally very strong. The baseplate is pre-drilled with holepatterns for both Arduino boards(Main and Mega so you get perfect alignment and no hole drilling for board mounting. Use the snap-in standoffs to quicklymount your board and go. Flanges on the lid let you mount your project anywhere with just 4 screws. Bolt it securely under your desk or to the ceiling! Or justinsert four rubber feet (not included) into the flange holes so your Arduino project can sit on your desk and not scratch it.http://www.sparkfun.com/commerce/product_info.php?products_id=10088http://www.sparkfun.com/commerce/product_info.php?products_id=10033
Wall Adapter Power Supply - 9VDC 650mA/ Wall Adapter Power Supply - 12VDC 600mA9VDC is High quality switching 'wall wart' AC to DC 9V 650mA wall power supply manufactured specifically for Spark Fun Electronics. These are switch modepower supplies which mean the output is regulated to 9V and the capable output current is much higher (650mA!). These will power most projects that don'trequire more than 650mA of current. Center-positive 5.5x2.1mm barrel connector.Works with 100-240VAC inputs.12VDC is a high quality AC to DC 'wall wart' which produces a regulated output of 12VDC at up to 600mA. These are switch mode power supplies which meansthe output is regulated to 12V and the capable output current is much higher (600mA!). These will power most projects that don't require more than 650mA ofcurrent. Center-positive 5.5x2.1mm barrel connector. Works with 100-240VAC inputs.http://www.sparkfun.com/commerce/product_info.php?products_id=298http://www.sparkfun.com/commerce/product_info.php?products_id=9442
9V to Barrel Jack AdapterPlug a 9V battery into one end and connect the other end to anything with a 5.5x2.1mm, center-positive barrel jack. Use this cable to battery-power any devicethat needs 9V and has an on-board barrel jack - it works great for Arduinos, development boards, evaluation boards, and more!http://www.sparkfun.com/commerce/product_info.php?products_id=9518
Battery Holder - 4xAA to Barrel Jack ConnectorThis is a simple 4 cell AA battery holder. The 5 inch cable is terminated with a standard 5.5x2.1mm, center positive barrel jack connector. The connector mateswith the barrel jack on the Arduino (among a number of other products) allowing you to easily make your project battery powered. Note: the average voltageregulator has about 1V of dropout (but can vary greatly). This pack, with normal alkaline batteries, will output ~5.5V causing a normal 5V board to run at around4 to 4.5V. This depends a lot of what board and processor you are using with the battery pack. Please consult your datasheet.http://www.sparkfun.com/commerce/product_info.php?products_id=9835
9V Solar & battery power supplyThe 9V Solar & battery power supply is specially designed for Arduino and other microcontroller project alike. It can be used as a portable power supply, and iscapable of delivering 9V, 500mA power. It can be charged by your PCB USB port or by sun-light or in-door light sources. It has following features:http://www.nuelectronics.com/estore/index.php?main_page=product_info&products_id=13
Long life Lithium Backpack Batteries for ArduinoThese are long-life batteries particularly designed for Arduino. There is also a variation for Arduino Mega. Depending on how much juice you need, get these inlow, medium, or high capacity. Bare battery PCB matches the size of the Arduino . High Capacity 2200mAh Lithium Ion Battery provides 29 Standby ArduinoHours. Medium Capacity 1000mAh Lithium Ion Battery provides 15 Standby Arduino Hours. Low Capacity 600mAh Lithium Ion Battery provides 9.4 StandbyArduino Hours. It is rechargeable via Arduino USB or via USB Tybe-B Mini Cable and supplies regulated 5V and 3.3V .http://www.liquidware.com/shop/show/bp/lithium+backpackhttp://www.liquidware.com/shop/show/BPM/http://antipastohw.blogspot.com/2008/06/how-to-install-lithium-backpack-to-your.html
Jumper wires with F/F, F/M and M/M connecting endsThese are easy to use jumper wires terminated as male to female, male to male or female to female for connections.http://www.sparkfun.com/commerce/product_info.php?products_id=9386http://www.sparkfun.com/commerce/product_info.php?products_id=8431http://www.sparkfun.com/commerce/product_info.php?products_id=8430
Color Coded Flat (Ribbon)/Coded Flat (Ribbon)These are easy to use jumper wires terminated as male to female, male to male or female to female for connections.http://www.newark.com/jsp/search/productdetail.jsp?SKU=23M8844&CMP=AFC-GB100000001http://www.allelectronics.com/make-a-store/item/RCBL-10TF/10-CONDUCTOR-TWIST-FLAT-RIBBON-CABLE/1.htmlhttp://www.allelectronics.com/make-a-store/item/RCBL-9/9-CONDUCTOR-FLAT-RIBBON-CABLE/1.htmlhttp://solutions.3m.com/wps/portal/3M/en_US/Interconnect/Home/Products/ProductCatalog/Catalog/?PC_7_RJH9U5230O73D0ISNF9B3C3SI1_nid=855TBYZXVNit6Z44P5GPWMglD2FDQK85M6bl
Conductive ThreadConductive thread is a creative way to connect various electronics onto clothing. This thread can carry current for power and signals. While not as conductive astraces on a printed circuit board (PCB), this thread makes wearable clothing 'wearable'!http://www.sparkfun.com/commerce/product_info.php?products_id=8544http://www.sparkfun.com/commerce/product_info.php?products_id=8549
ProtoboardProtoboards provide a free canvass for devising soldered circuit compositions. They come in different colors and sizes.http://www.sparkfun.com/commerce/product_info.php?products_id=8619http://www.sparkfun.com/commerce/product_info.php?products_id=8708http://www.sparkfun.com/commerce/product_info.php?products_id=8808http://www.sparkfun.com/commerce/product_info.php?products_id=8814http://www.sparkfun.com/commerce/product_info.php?products_id=8809http://www.sparkfun.com/commerce/product_info.php?products_id=8847http://www.sparkfun.com/commerce/product_info.php?products_id=8885http://www.sparkfun.com/commerce/product_info.php?products_id=8887
Solderless BreadboardTo free yourself from the pain of soldering and also from the risk of ruining your components it is advisable to your breadboards. Breadboards come in differentsizes and even colorshttp://www.sparkfun.com/commerce/product_info.php?products_id=9567http://www.sparkfun.com/commerce/product_info.php?products_id=8800http://www.sparkfun.com/commerce/product_info.php?products_id=8802http://www.sparkfun.com/commerce/product_info.php?products_id=8803http://www.sparkfun.com/commerce/product_info.php?products_id=137http://www.sparkfun.com/commerce/product_info.php?products_id=7916
Breadboard Power Supply Stick 5V/3.3VThis is a very simple board that takes a 6-12V input voltage and outputs a selectable 5V or 3.3V regulated voltage. All headers are 0.1" pitch for simple insertioninto a breadboard. Input power can be supplied to either the DC barrel jack or the two pin header labeled + and -. Output power is supplied to the pins labeledGND and VCC. Board has both an On/Off switch and a voltage select switch (3.3V/5V).http://www.sparkfun.com/commerce/product_info.php?products_id=9319
Micro SD Shield –Data Logger Shield for ArduinoRunning out of memory space in your Arduino project? The microSD Shield equips your Arduino with mass-storage capability, so you can use it for data-loggingor other related projects. Communication with microSD cards is achieved over an SPI interface. The SCK, DI, and DO pins of the microSD socket are brokenout to the ATmega168/328's standard SPI pins (digital 11-13), while the CS pin is broken out to Arduino's D8 pin. If you decide to use one of the many opensource FAT libraries (like FAT16 or SDFat) make sure to change the code to reflect the location of the CS pin. Most libraries assume the CS pin is connected toD10; this will have to be changed to D8. Also for the libraries to work pin D10 will have to be set as an output in the 'setup()' section of your sketch. The shieldalso includes a large prototyping area with a 13x12 grid of 0.1" pitch PTHs. This shield comes populated with a microSD socket, red power indicator LED, and areset button; but it does not come with headers installed. We recommend the 6 and 8-pin stackable headers.http://www.sparkfun.com/commerce/product_info.php?products_id=9802
XBEE Module and XBEE Shield for ArduinoThis is the very popular 2.4GHz XBee module from Digi (formally Maxstream). These modules take the 802.15.4 stack (the basis for Zigbee) and wrap it into asimple to use serial command set. These modules allow a very reliable and simple communication between microcontrollers, computers, systems, reallyanything with a serial port! Point to point and multi-point networks are supported.The XBee Shield simplifies the task of interfacing an XBee with your Arduino. This board mates directly with an Arduino Pro and equips it with wirelesscommunication capabilities using the popular XBee module. This unit works with all XBee modules including the Series 1 and Series 2.5, standard and Proversion. The serial pins (DIN and DOUT) of the XBee are connected through an SPDT switch, which allows you to select a connection to either the UART pins(D0, D1) or any digital pins on the Arduino (D2 and D3 default). Power is taken from the 5V pin of the Arduino and regulated on-board to 3.3VDC before beingsupplied to the XBee. The shield also takes care of level shifting on the DIN pin of the XBee. The board also includes LEDs to indicate power and activity onDIN, DOUT, RSSI, and DIO5 pins of the XBee. The Arduino's reset button is brought out on the shield, and a 12x11 grid of 0.1" holes are available forprototyping. The shield does not come with headers installed; we recommend the 6 and 8-pin stackable headers. The XBee module is also not included.http://www.sparkfun.com/commerce/product_info.php?products_id=9841http://www.sparkfun.com/commerce/product_info.php?products_id=8664http://www.sparkfun.com/commerce/product_info.php?products_id=8665
Cellular Shield with SM5100B for ArduinoThe Cellular Shield for Arduino includes all the parts needed to interface your Arduino with an SM5100B cellular module. This allows you to easily add SMS,GSM/GPRS, and TCP/IP functionalities to your Arduino-based project. All you need to add cellular functionality to your Arduino project is a SIM card (pre-paid orstraight from your phone) and an antenna and you can start sending Serial.print statements to make calls, send texts and serve web pages! The maincomponents of the Cellular Shield are a 60-pin SM5100B connector, a SIM card socket, and an SPX29302 voltage regulator configured to regulate theArduino's raw voltage to 3.8V. The board's red LED indicates power. The Arduino's reset button is also brought out on the shield. Two jumpers on the boardallow you to select which serial pins interface with the cellular module - software (D2, D3) or hardware (D0, D1). There is also a 5-pin, 0.1" spaced header withconnections for microphone inputs and speaker outputs. Headers are not soldered on, w e recommend the 6 and 8-pin stackable headers. The SM5100Bcellular module is included with this product, however the SMA to u.FL connector is not. It is pre-configured to 9600bps.http://www.sparkfun.com/commerce/product_info.php?products_id=9607http://www.sparkfun.com/commerce/product_info.php?products_id=9145
29
30
Arduino-Digital OutputDigital Out put is defined as sending on/off or 0/1 signals from one of the digital pins on theAurduino board (pin 2-13) to the electronic actuator that recognize on/off or 0/1 signal.The so-called digital pins are highlighted here.31
Arduino-Digital Output-LEDLED (Light Emitting Diode) is a light feature that can be used as an actuator of the space.Being a Diode, an LED is a directional piece meaning that it is activated only if it is placed in thecircuit in the right directionGround PinDigital Pin32
Arduino-Ground PinFor electricity to flow in a circuit, we need difference in level of electricity energy. In Arduinoboard this difference is provided by making a circuit between one of the output pins and groundpin.When we send a signal through output pin any signal that is not 0 or LOW will provide thedesired difference between the two ends of the circuit and will result in electricity flow betweenthe digital output pin and ground pin- The level of electricity energy at Ground pin is zero, as aresult any non zero signal on the digital pin gives us a difference and an electricity flow.You can also create this situation using two output pins, one sending the low signal and onesending a high signal. The low signal pin in this case will function as the ground.33
Arduino-Digital Output-LEDLEDs come in different colors and shapes.34
Arduino-Digital Output-LED35
Arduino-Digital Output-LED36
void setup(){pinMode(13, OUTPUT);}void loop(){digitalWrite(13, HIGH);delay(1000);digitalWrite(13, LOW);delay(1000);}Arduino-Digital Output-LED37
38Arduino-Checking the Right Board
39Arduino-Checking the Right Port
Arduino-Compiling and Uploading Code1. Write the code2. Compile the code3. Check Arduino Port Connection4. Upload the Code5. The Arduino and Connected Circuits start to show behavior based on the uploaded code40
Arduino-Digital Output-LED41
Arduino-Digital Output-LEDThe Board should be connected to the computer in order to upload the program from arduinoenvironment to the board. Once the program is uploaded, if there is no realtime data beingcommunicated between the board and the program there is no need for the board to beconnected any more. Thus you can change the power to Ext(external Power) as opposed toUSB(power from USB) and use a battery or a power adaptor to power the board.In the case of the LED exercise since after uploading there is no data being communicatedbetween the board and the computer, you can disconnect the piece and make it a independentdisconnected piece.42
Arduino-Using SolderlessBreadboardSolderless Board is useful to build prototypes, as fast as possible without going throughtiresome and time consuming process of soldering parts together to make connections43
Arduino-Using SolderlessBreadboardSolderless Board is useful to build prototypes, as fast as possible without going throughtiresome and time consuming process of soldering parts together to make connectionsMost important thing in using a solderless breadboard in understanding its connections andwiring underneath the white cover to be able to connect parts in a way that complete andflawless lines are provided for electricity flow44
Arduino-Using SolderlessBreadboardSolderless Board is useful to build prototypes, as fast as possible without going throughtiresome and time consuming process of soldering parts together to make connectionsMost important thing in using a solderless breadboard in understanding its connections andwiring underneath the white cover to be able to connect parts in a way that complete andflawless lines are provided for electricity flow45
Arduino-Using SolderlessBreadboardFor example this is how an LED can be connected to an Arduino board using a solderlessbreadboard.*we are using color codes in wiring. Red wire is connected to output pin and black wire isconnected to Ground46
Arduino-Using SolderlessBreadboardFor example this is how an LED can be connected to an Arduino board using a solderlessbreadboard. The red dotted line shows the flow of electricity from the digital output pin to LEDand then ground pin.47
Arduino-Using SolderlessBreadboardUsing a Solderless breadboard does not make that much of sense if we are only connecting oneLED to the board with one in and one out wire connected to it. It is best suited when we want tohave multiple elements connected to one or multiple pins.For example what if we want to control multiple LEDs from one digital output pin on Arduinoboard?48
Arduino-Connecting Multiple Actuators toSingle Output Pin-Serial ConnectionGround PinDigital PinIn Serial connection, adding more electricity consuming elements results in weaker electricityflow. In case of Arduino Board adding more than three High intensity LEDs will result in so weakan electricity flow that the LEDs will not turn onAlso, in Serial connection, disconnecting any element of the connection-i.e. disconnecting one ofthe LEDs will result in breaking the circuit and as a result electricity will stop flowing and thewhole circuit will not work anymore49
Arduino-Connecting Multiple Actuators toSingle Output Pin-Serial ConnectionSerial Connection on Solderless Board-The left diagram shows the electricity flow in the circuit.50
Arduino-Connecting Multiple Actuators toSingle Output Pin-Parallel ConnectionGround Pin Digital PinIn Parallel connection, adding more electricity consuming elements do not result in decrease ofelectricity flowAlso, in Parallel connection, disconnecting any element of the connection-i.e. disconnecting oneof the LEDs will not result in breaking the circuit since each element is individually connected toboth digital output pin and ground pin.51
Arduino-Connecting Multiple Actuators toSingle Output Pin-Parallel ConnectionParallel Connection on Solderless Board.52
Arduino-Analog Output-LEDAnalog Out put is defined as sending signals from one of the digital pins on the Aurduino boardthat range between two extremes: 0-255Out of 13 Digital pins on Arduino board the following pins can be used to signal out Analogoutput: 3,5,6,9,10,11These are the pins with PWM label next to them on the board53
Arduino-Analog Output-LEDFor this exercise since we need to see the light variations , we are going to use a high intensityLED. High Intensity LEDs emit more light than normal LEDs and it is easier to detect lightvariations, using them.54
Arduino-Analog Output-LED55
Arduino-Analog Output-LED//pin 11,10,9,6,5,3 can be used for Analog outputvoid setup(){pinMode(11, OUTPUT); // Specify Arduino Pin number and output/input mode}void loop(){analogWrite(11, 255); // sending Analog output 255delay(500); // Wait for half a secondanalogWrite(11, 200); // Sending Analog output 200delay(500); // Wait for half a secondanalogWrite(11, 150); // Sending Analog output 150delay(500); // Wait for half a secondanalogWrite(11, 100); // Sending Analog output 100delay(500); // Wait for half a secondanalogWrite(11, 50); // Sending Analog output 50delay(500); // Wait for half a secondanalogWrite(11, 0); // sending analog output 0delay(500); // Wait for half a second}56
Arduino-Analog Output-LED_Dimming UsingLoop Structure57
Arduino-Analog Output-LED_Dimming UsingLoop Structure//pin 11,10,9,6,5,3 can be used for Analog outputvoid setup(){pinMode(11, OUTPUT); // Specify Arduino Pin number and output/input mode}void loop(){for(int i=255; i>0; i--){analogWrite(11, i); // sending Analog output 255delay(20);}for(int i=0; i<255; i++){analogWrite(11, i); // sending Analog output 255delay(20);}}58
Arduino-Controlling Multiple Actuatorsseparately from different output pins59Follow the above diagram to assemble your circuit:Black represents the wiring that is connected to groundRed represents wiring that is connected to Aurdoino output pinsYellow represents wiring that is providing connections on Solderless Board to create seamlesselectricity flow for the Ground Line that we are creating. LEDs are seperately connected to digitalpins while are all connected to the same Ground pin via a Ground Line on the solderless board
Arduino-Controlling Multiple Actuatorsseparately from different output pins-Sequencing60
Arduino-Controlling Multiple Actuatorsseparately from different output pins-Sequencingvoid setup(){pinMode(2, OUTPUT); // Specify Arduino Pin number and output/input modepinMode(3, OUTPUT); // Specify Arduino Pin number and output/input modepinMode(4, OUTPUT); // Specify Arduino Pin number and output/input modepinMode(5, OUTPUT); // Specify Arduino Pin number and output/input modepinMode(6, OUTPUT); // Specify Arduino Pin number and output/input modepinMode(7, OUTPUT); // Specify Arduino Pin number and output/input modepinMode(8, OUTPUT); // Specify Arduino Pin number and output/input mode}void loop(){for(int i=2; i<9; i++){//iterating through pin 2 to 8 and turning them on one by onedigitalWrite(i,HIGH); //Sending High Signal to Pindelay(1000); //Wait 1 second}for(int i=9; i>2; i--){//iterating through pin 8 to 2 and turning them off one by onedigitalWrite(i,LOW); //Sending LOW Signal to Pindelay(1000); //Wait 1 second}}61
Arduino-Controlling Multiple Actuatorsseparately from different output pins-Sequencing62
Arduino-Controlling Multiple Actuatorsseparately from different output pins-Random Patterns63
Arduino-Controlling Multiple Actuatorsseparately from different output pins-Random Patternsvoid setup(){pinMode(2, OUTPUT); // Specify Arduino Pin number and output/input modepinMode(3, OUTPUT); // Specify Arduino Pin number and output/input modepinMode(4, OUTPUT); // Specify Arduino Pin number and output/input modepinMode(5, OUTPUT); // Specify Arduino Pin number and output/input modepinMode(6, OUTPUT); // Specify Arduino Pin number and output/input modepinMode(7, OUTPUT); // Specify Arduino Pin number and output/input modepinMode(8, OUTPUT); // Specify Arduino Pin number and output/input mode}void loop(){for(int i=2; i<9; i++){//iterating through pin 2 to 8 and turning them on/off randomlyint signal=int(random(0,2));digitalWrite(i,signal); //Sending High Signal to Pin}delay(1000); //Wait 1 second}64
Arduino-Controlling Multiple Actuatorsseparately from different output pins-Random Patterns65
Arduino-Controlling Multiple Actuatorsseparately from different output pins-Random PatternsAside from introduction of randomness, payattention to how changing the place of delay()function can change the systems behavior. Here we put the delay function out side of the forloop. As a result instead of seeing the change for each actuator one by one in a sequence, whichis the case in the previous exercise, here, at first all the actuators(LEDs) are configured togetherand then the system pauses for one second to let us see the over all configuration. 66
67Arduino-Controlling Actuators Based onInput from Arduino Serial Port
68Arduino-Controlling Actuators Based onInput from Arduino Serial Port//pin 11,10,9,6,5,3 can be used for Analog outputint serialNumber=0;int lightIntensityValue=0;void setup(){Serial.begin(9600);pinMode(11, OUTPUT); // Specify Arduino Pin number and output/input mode}void loop(){int value=Serial.read();Serial.println(value);if(value!=-1 && value!=10){serialNumber=serialNumber*10+(value-48);}if(value==10){lightIntensityValue=serialNumber%255;Serial.print("Number Recieved from Serial Port:");Serial.println(serialNumber);serialNumber=0;}analogWrite(11,lightIntensityValue);delay(1000);}1. Data is received from Serial port as ASCII codes.2. If data is numerical, each digit is sent separately.3. ASCII code of zero is 484. To calculate the numerical value of a digit from its ASCI code: digit=ASCII-485. At the end of a package the serial port send a number 106. If nothing is passed to the serial port, the port sends number -1 as default
void setup(){pinMode(13,OUTPUT);pinMode(12,OUTPUT);pinMode(11,OUTPUT);pinMode(10,OUTPUT);}void loop(){digitalWrite(11,LOW);digitalWrite(13,HIGH);digitalWrite(12,LOW);digitalWrite(10,LOW);delay(1000);digitalWrite(13,LOW);digitalWrite(12,HIGH);digitalWrite(10,LOW);delay(1000);digitalWrite(13,LOW);digitalWrite(12,LOW);digitalWrite(10,HIGH);delay(1000);}3-Color LED**Make sure you are not doing the circuit vice versa!!!** Sometimes the long leg should be high and the legwhich is low would determine the color of the lightDigital Pin13LOW/HIGH Digital Pin12LOW/HIGHDigital Pin10LOW/HIGHDigital Pin11LOW69
Arduino-Digital Output-Sound-PiezoA Piezo is an electronic piece that converts electricity energy to sound. It is a digital outputdevice. You can make white noise or even exact musical notes ( frequencies for musical notes)based on the duration that you iterate between HIGH and LOW signals.A Piezo is a directional piece, meaning that it has a positive and negative pole. The positive poleshould be connected to the digital output pin that you allocate to control the piezo and thenegative pole should be connected to Ground pin70
Arduino-Digital Output-Sound-Piezo71
Arduino-Digital Output-Sound-Piezo//connect piezo to pin 13 and groundint freqs[] = {1915, 1700, 1519, 1432, 1275, 1136, 1014, 956};//string tones[] = {"do", "re", "mi", "fa","sol"," la", "si", "do"};void setup(){pinMode(13,OUTPUT);}void loop(){for(int i=0;i<8;i++){//iterating through notesfor(int j=0;j<1000;j++){//the time span that each note is being playeddigitalWrite(13,HIGH);delayMicroseconds(freqs[i]);digitalWrite(13,LOW);delayMicroseconds(freqs[i]);}}}72
Arduino-Digital Output-Sound-Piezo-Playing a melody73
Arduino-Digital Output-Sound-Piezo-Playing a melody//connect piezo to pin 13 and groundvoid playNote(int note){for(int j=0;j<60;j++){//the time span that each note is being playeddigitalWrite(13,HIGH);delayMicroseconds(note);digitalWrite(13,LOW);delayMicroseconds(note);}delay(60);}int pause=200;int freqs[] = {1915, 1700, 1519, 1432, 1275, 1136, 1014, 956};//string tones[] = {"do", "re", "mi", "fa","sol"," la", "si", "do"};// i = { 0 1 2 3 4 5 6 7//mi mi mi - mi mi mi - mi sol do re mi - - - fa fa fa fa fa mi mi mi mi re re mi re - sol - mi mi mi - mi mi mi - mi sol do re mi -- fa fa fa fa fa mi mi mi sol sol fa re do - - -void setup(){pinMode(13,OUTPUT);}void loop(){playNote(freqs[2]); playNote(freqs[2]); playNote(freqs[2]); delay(pause);playNote(freqs[2]); playNote(freqs[2]); playNote(freqs[2]); delay(pause);playNote(freqs[2]); playNote(freqs[4]); playNote(freqs[0]); playNote(freqs[1]);playNote(freqs[2]); delay(pause); delay(pause); delay(pause);playNote(freqs[3]); playNote(freqs[3]); playNote(freqs[3]); playNote(freqs[3]);playNote(freqs[3]); playNote(freqs[2]); playNote(freqs[2]); playNote(freqs[2]);playNote(freqs[2]); playNote(freqs[1]); playNote(freqs[1]); playNote(freqs[2]);playNote(freqs[1]); delay(pause); playNote(freqs[4]); delay(pause);playNote(freqs[2]); playNote(freqs[2]); playNote(freqs[2]); delay(pause);playNote(freqs[2]); playNote(freqs[2]); playNote(freqs[2]); delay(pause);playNote(freqs[2]); playNote(freqs[4]); playNote(freqs[0]); playNote(freqs[1]);playNote(freqs[2]); delay(pause); delay(pause); delay(pause);playNote(freqs[3]); playNote(freqs[3]); playNote(freqs[3]); playNote(freqs[3]);playNote(freqs[3]); playNote(freqs[2]); playNote(freqs[2]); playNote(freqs[2]);playNote(freqs[4]); playNote(freqs[4]); playNote(freqs[3]); playNote(freqs[3]);playNote(freqs[0]); delay(pause); delay(pause); delay(pause);}74
Arduino-Same Signal Multiple InterpretationsIn the same setting if you connect an LED parallel to Piezo, you can see how the same signalcan be interpreted differently using a different output device that accept the same type ofsignals(in this case digital signal)75
Arduino-DigitalOutput-Motion-Servo MotorServo Motors are electronic devices that convert digital signal to rotational movement. There aretwo sorts of servo motors: Standard servos that their rotation is limited to maximum of 180degrees in each direction and Continuous Rotation Servos that can provide rotation unlimitedly inboth directions76
A servo motor is a motor that pulses at a certain rate moving its gear at a certain angle. It hasthree connections: the black is ground, the red is connected to 5V, and the white (yellowwire here) is set to the digital pin.Arduino-DigitalOutput-Motion-Servo MotorGroundV5Digital Pin77
Arduino-Standard Servo Rotation to Exact Angel78
Arduino-Standard Servo Rotation to Exact Angel#include <Servo.h>Servo myservo; // create servo object to control a servoint pos = 0; // variable to store the servo positionvoid setup(){myservo.attach(9); // attaches the servo on pin 9 to the servo object}void loop(){myservo.attach(9);for(pos = 0; pos < 180; pos += 1) // goes from 0 degrees to 180 degrees{ // in steps of 1 degreemyservo.write(pos); // tell servo to go to position in variable 'pos'delay(15); // waits 15ms for the servo to reach the position}for(pos = 180; pos>=1; pos-=1) // goes from 180 degrees to 0 degrees{myservo.write(pos); // tell servo to go to position in variable 'pos'delay(15); // waits 15ms for the servo to reach the position}myservo.detach(); //Detach the servo if you are not controling it for a whiledelay(2000);}79
Arduino-Controlling Standard Servo with User Input80
Arduino-Controlling Standard Servo with User Input#include <Servo.h>Servo myservo; // create servo object to control a servoint pos = 0; // variable to store the servo positionint angleValue=0;int serialNumber=0;void setup(){Serial.begin(9600);myservo.attach(9);}void loop(){int value=Serial.read();Serial.println(value);if(value!=-1 && value!=10){serialNumber=serialNumber*10+(value-48);}if(value==10){myservo.attach(9);angleValue=serialNumber%180;myservo.write(angleValue); // tell servo to go to position in variable 'pos'Serial.print("Number Recieved from Serial Port:");Serial.println(serialNumber);serialNumber=0;delay(250);}myservo.detach();}81
Arduino-Controlling Servo with User Input82
As opposed to standard Servo that its rotation is limited to 180 degrees both ways, a continuousrotation servo can keep rotating unlimitedly-again both ways- based on the frequency that ispulsed out to it. There is a specific frequency at which the Servo motor should be static andbeyond and before which the servo will change in its rotation direction.Arduino-DigitalOutput - Continuous RotationGroundV5Digital Pin83
As opposed to standard Servo that its rotation is limited to 180 degrees both ways, a continuousrotation servo can keep rotating unlimitedly-again both ways- based on the frequency that ispulsed out to it. There is a specific frequency at which the Servo motor should be static andbeyond and before which the servo will change in its rotation direction.There is a pin on the servo motor that enables us to adjust the servo for its static frequency.Arduino-Digital Output - Continuous Rotation-Adjustment84
Arduino-Digital Output - Continuous Rotation-Adjustmentvoid setup(){pinMode(5,OUTPUT);}void loop(){for (int i = 0; i <= 200; i++){digitalWrite(5,HIGH);delayMicroseconds(1500); // 1.5ms This is the frequency at which the servo motor should be staticdigitalWrite(5,LOW);delay(20); // 20ms}}Upload the following code to the board and while the servo isconnected, try to adjust the pin until the servo motor is static.Once the servo is adjusted to this code any pulse grater than 1500 willresult in rotation in one direction while any pulse less than 1500 willresult in rotation in the other direction85
Once the servo is adjusted to this code any pulse graterthan 1500 will result in rotation in one direction while anypulse less than 1500 will result in rotation in the otherdirectionArduino-Digital Output - Continuous Rotation-Direction Change86
Arduino-Digital Output - Continuous Rotation-Direction ChangeOnce the servo is adjusted to this code any pulse graterthan 1500 will result in rotation in one direction while anypulse less than 1500 will result in rotation in the otherdirectionvoid setup(){pinMode(5,OUTPUT);}void loop(){//Rotating in One directionfor (int i = 0; i <= 200; i++){digitalWrite(5,HIGH);delayMicroseconds(1800);digitalWrite(5,LOW);delay(20); // 20ms}//Stopfor (int i = 0; i <= 200; i++){digitalWrite(5,HIGH);delayMicroseconds(1500);digitalWrite(5,LOW);delay(20); // 20ms}//Rotating in the other directionfor (int i = 0; i <= 200; i++){digitalWrite(5,HIGH);delayMicroseconds(1200);digitalWrite(5,LOW);delay(20); // 20ms}//Stopfor (int i = 0; i <= 200; i++){digitalWrite(5,HIGH);delayMicroseconds(1500);digitalWrite(5,LOW);delay(20); // 20ms}} 87
Arduino-Digital Output - Continuous Rotation-Delayed StepsPlaying with delay() gives us pauses between rotationstepsvoid setup(){pinMode(5,OUTPUT);}void loop(){//Continious Rotationfor (int i = 0; i <= 20; i++){digitalWrite(5,HIGH);delayMicroseconds(1800);digitalWrite(5,LOW);delay(1);}//Rotating with delayed stepsfor (int i = 0; i <= 20; i++){digitalWrite(5,HIGH);delayMicroseconds(1800);digitalWrite(5,LOW);delay(100);}//More Delayfor (int i = 0; i <= 20; i++){digitalWrite(5,HIGH);delayMicroseconds(1800);digitalWrite(5,LOW);delay(200);}//More Delayfor (int i = 0; i <= 20; i++){digitalWrite(5,HIGH);delayMicroseconds(1800);digitalWrite(5,LOW);delay(400);}//More Delayfor (int i = 0; i <= 20; i++){digitalWrite(5,HIGH);delayMicroseconds(1800);digitalWrite(5,LOW);delay(800);}//More Delayfor (int i = 0; i <= 20; i++){digitalWrite(5,HIGH);delayMicroseconds(1800);digitalWrite(5,LOW);delay(1800);}}88
Arduino-Digital Output - Continuous Rotation-Controlling Rotation AnglePlaying with the number of steps in the for loop gives usvariations in the span /Angle of the rotationvoid setup(){pinMode(5,OUTPUT);}void loop(){for (int i = 0; i <= 10; i++){digitalWrite(5,HIGH);delayMicroseconds(1800);digitalWrite(5,LOW);delay(20);}delay(1000);for (int i = 0; i <= 20; i++){digitalWrite(5,HIGH);delayMicroseconds(1800);digitalWrite(5,LOW);delay(20);}delay(1000);for (int i = 0; i <= 30; i++){digitalWrite(5,HIGH);delayMicroseconds(1800);digitalWrite(5,LOW);delay(20);}delay(1000);for (int i = 0; i <= 40; i++){digitalWrite(5,HIGH);delayMicroseconds(1800);digitalWrite(5,LOW);delay(20);}delay(1000);}89
Arduino-Digital Output – Wind –Controlling a FanControlling a Fan is as easy as sending a HIGH or LOWSignal to the Pin that the fan is connected to.// Connect the fan to Pin 13 and Groundvoid setup(){pinMode(13, OUTPUT); // Specify Arduino Pin numberand output/input mode}void loop(){digitalWrite(13, HIGH); // Turn on Pin 13 sending aHIGH Signaldelay(1000); // Wait for one seconddigitalWrite(13, LOW); // Turn off Pin 13 sending aLOW Signaldelay(3000); // Wait for Three second}90
Arduino-Digital Output – Rotation –Controlling a DCMotor// Connect to Pin 13 and Groundvoid setup(){pinMode(13, OUTPUT); // Specify Arduino Pin numberand output/input mode}void loop(){digitalWrite(13, HIGH); // Turn on Pin 13 sending aHIGH Signaldelay(1000); // Wait for one seconddigitalWrite(13, LOW); // Turn off Pin 13 sending aLOW Signaldelay(3000); // Wait for Three second}91// Connect to Pin 13 and 12void setup(){pinMode(13, OUTPUT); // Specify Arduino Pin numberand output/input modepinMode(12, OUTPUT);}void loop(){digitalWrite(13, HIGH); // Turn on Pin 13 sending aHIGH SignaldigitalWrite(12, LOW); //Make Pin 12 a Grounddelay(1000); // Wait for one seconddigitalWrite(13, LOW); // Make Pin 13 a GrounddigitalWrite(12, HIGH); // Turn on Pin 12 sending aHIGH Signaldelay(3000); // Wait for Three second}Code for Rotation/No RotationCode for CW and CCW Rotation
V52345Stepper motors translate digital switching sequences into motion.They are used in a variety of applications requiring precise motionsunder computer control.Unlike ordinary dc motors, which spin freely when power isapplied,steppers require that their power source be continuouslypulsed in specific patterns. These patterns, or step sequences,determine the speed and direction of a stepper’s motion.For each pulse or step input, the stepper motor rotates a fixedangular increment; typically 1.8 or 7.5 degrees.Steppers are driven by the interaction (attraction and repulsion) ofmagnetic fields. The driving magnetic field “rotates” as strategicallyplaced coils are switched on and off. This pushes and pulls atpermanent magnets arranged around the edge of a rotor that drivesthe output shaft.Arduino- Digital Output–Rotation–Stepper Motor92
93
When the on-off pattern of the magnetic fields is in theproper sequence, the stepper turns (when it’s not, thestepper sits and quivers).The most common stepper is the four-coil unipolar variety.These are called unipolar because they require only thattheir coils be driven on and off. Bipolar steppers require thatthe polarity of power to the coils be reversed.The normal stepping sequence for four-coil unipolarsteppers appears in the figure. If you run the steppingsequence in the figure forward, the stepper rotatesclockwise; run it backward, and the stepper rotatescounterclockwise.The motor’s speed depends on how fast the controller runsthrough the step sequence. At any time the controller canstop in mid sequence.If it leaves power to any pair of energized coils on, themotor is locked in place by their magnetic fields. This pointsout another stepper motor benefit: built-in brakes.Stepper Motor94
Stepper Motor95
void setup(){pinMode(2,OUTPUT);pinMode(3,OUTPUT);pinMode(4,OUTPUT);pinMode(5,OUTPUT);}void loop(){// Pause between the types that determines the speedint stepperSpeed=200;// Change to change speedint dir=1;// change to -1 to change directionif (dir==1){ //Running ClockwisedigitalWrite(2,HIGH);//Step 1digitalWrite(3,LOW);digitalWrite(4,HIGH);digitalWrite(5,LOW);delay(stepperSpeed);// Pause between the types that determines the speeddigitalWrite(2,HIGH);//Step 2digitalWrite(3,LOW);digitalWrite(4,LOW);digitalWrite(5,HIGH);delay(stepperSpeed);// Pause between the types that determines the speeddigitalWrite(2,LOW);//Step 3digitalWrite(3,HIGH);digitalWrite(4,LOW);digitalWrite(5,HIGH);delay(stepperSpeed);// Pause between the types that determines the speeddigitalWrite(2,LOW);//Step 4digitalWrite(3,HIGH);digitalWrite(4,HIGH);digitalWrite(5,LOW);delay(stepperSpeed);// Pause between the types that determines the speed}if (dir==-1){ //Running CounterClockwisedigitalWrite(2,LOW);//Step 4digitalWrite(3,HIGH);digitalWrite(4,HIGH);digitalWrite(5,LOW);delay(stepperSpeed);// Pause between the types that determines the speeddigitalWrite(2,LOW);//Step 3digitalWrite(3,HIGH);digitalWrite(4,LOW);digitalWrite(5,HIGH);delay(stepperSpeed);// Pause between the types that determines the speeddigitalWrite(2,HIGH);//Step 2digitalWrite(3,LOW);digitalWrite(4,LOW);digitalWrite(5,HIGH);delay(stepperSpeed);// Pause between the types that determines the speeddigitalWrite(2,HIGH);//Step1digitalWrite(3,LOW);digitalWrite(4,HIGH);digitalWrite(5,LOW);delay(stepperSpeed);// Pause between the types that determines the speed}}Stepper Motor-Direction and Speed96
Vibration Motor: A vibration motor! This itty-bitty, shaftless vibratory motor is perfect for non-audible indicators. Use in any number of applications to indicate to the wearer whena status has changed. All moving parts are protected within the housing. With a 2-3.6V operating range, these units shake crazily at 3V. Once anchored to aPCB or within a pocket, the unit vibrates softly but noticeably. This high quality unit comes with a 3M adhesive backing and reinforced connection wires.http://www.sparkfun.com/products/8449
MigaOne Linear Actuator and Muscle WiresMigaOne is a unique electric actuator based on Shape Memory Alloy (SMA) wire, also known as muscle wire. Exposing the MigaOne to 10V and 2.7A for half asecond will cause the wires to heat up, contract, and push what ever is attached to the arm with 2.5 lbs. (11N) of force. Surprisingly strong for such a slimactuator. This is a very new type of actuator with many interesting potential applications. Checkout the datasheet for more ideas and information.http://www.sparkfun.com/products/8751http://www.musclewires.com/Products.php
Firgelli Linear ActuatorThey come in various shapes and sizes and powers. They are able to initiate straight locomotion.http://www.robotshop.com/
Flexible HeaterThey come in various shapes and sizes and powers. They are able to regulate temperature.http://www.omega.com/
Solenoid Water ValvesAllow to control flow of fluids electronically.iklimnet.comHoneywell.comjelpc-pneumatic.com
Hagen-Laguna Ultrasonic Fog GeneratorGenerates mistMarineDepot.com
Single/Double/Tri Color LED Matrix7 segment LED Digital DisplayLED StripsRGB LEDsSparkfun.comhttp://www.jameco.com/www.ledsupply.com/http://www.oznium.com/led-strip-flat-head
Arduino-Digital Output – Controling any ElectricalDevice with any power needs using a relay// Connect to Pin 13 and Groundvoid setup(){pinMode(13, OUTPUT); // Specify Arduino Pin number andoutput/input mode}void loop(){digitalWrite(13, HIGH); // Turn on Pin 13 sending a HIGH Signaldelay(1000); // Wait for one seconddigitalWrite(13, LOW); // Turn off Pin 13 sending a LOW Signaldelay(3000); // Wait for Three second}104Externally Powered DeviceExternally Powered DeviceExternalPower3v-220vControl PinGRD

Recommended

DOCX
The arduino uno is a microcontroller board based on the
PDF
Getting Started With Arduino_Tutorial
PDF
Introduction to Arduino
PPTX
Arduino as an embedded industrial controller
PDF
Ardunio
PDF
Arduino experimenters guide hq
PDF
Introduction to Arduino and Circuits
PDF
Arduino Lecture 1 - Introducing the Arduino
PPTX
Introduction to Arduino
 
PDF
Arduino Development For Beginners
PPT
Intro to Arduino
PDF
Introducing... Arduino
PPTX
Lesson sample introduction to arduino
PPTX
What are the different types of arduino boards
PPTX
Arduino Model's
PDF
Introducing the Arduino
PDF
Introduction to Arduino Programming
PPTX
Arduino
PPTX
Introduction to Arduino
PDF
Arduino Lecture 4 - Interactive Media CS4062 Semester 2 2009
PPT
Arduino Platform with C programming.
PPTX
Aurdino presentation
PDF
Arduino 101
PPTX
Intro to Arduino.ppt
PPTX
Arduino and c programming
PPS
Arduino Uno Pin Description
PPTX
Arduino Programming Software Development
PDF
Arduino: Arduino lcd
PPTX
Introduction to arduino
DOCX
Arduino Full Tutorial

More Related Content

DOCX
The arduino uno is a microcontroller board based on the
PDF
Getting Started With Arduino_Tutorial
PDF
Introduction to Arduino
PPTX
Arduino as an embedded industrial controller
PDF
Ardunio
PDF
Arduino experimenters guide hq
PDF
Introduction to Arduino and Circuits
PDF
Arduino Lecture 1 - Introducing the Arduino
The arduino uno is a microcontroller board based on the
Getting Started With Arduino_Tutorial
Introduction to Arduino
Arduino as an embedded industrial controller
Ardunio
Arduino experimenters guide hq
Introduction to Arduino and Circuits
Arduino Lecture 1 - Introducing the Arduino

What's hot

PPTX
Introduction to Arduino
 
PDF
Arduino Development For Beginners
PPT
Intro to Arduino
PDF
Introducing... Arduino
PPTX
Lesson sample introduction to arduino
PPTX
What are the different types of arduino boards
PPTX
Arduino Model's
PDF
Introducing the Arduino
PDF
Introduction to Arduino Programming
PPTX
Arduino
PPTX
Introduction to Arduino
PDF
Arduino Lecture 4 - Interactive Media CS4062 Semester 2 2009
PPT
Arduino Platform with C programming.
PPTX
Aurdino presentation
PDF
Arduino 101
PPTX
Intro to Arduino.ppt
PPTX
Arduino and c programming
PPS
Arduino Uno Pin Description
PPTX
Arduino Programming Software Development
PDF
Arduino: Arduino lcd
Introduction to Arduino
 
Arduino Development For Beginners
Intro to Arduino
Introducing... Arduino
Lesson sample introduction to arduino
What are the different types of arduino boards
Arduino Model's
Introducing the Arduino
Introduction to Arduino Programming
Arduino
Introduction to Arduino
Arduino Lecture 4 - Interactive Media CS4062 Semester 2 2009
Arduino Platform with C programming.
Aurdino presentation
Arduino 101
Intro to Arduino.ppt
Arduino and c programming
Arduino Uno Pin Description
Arduino Programming Software Development
Arduino: Arduino lcd

Viewers also liked

PPTX
Introduction to arduino
DOCX
Arduino Full Tutorial
ODP
Arduino Presentation
PPT
Arduino
PPT
Raspberry pi
PPTX
IOT Based Home Automation using Raspberry Pi-3
PPTX
Introduction to raspberry pi
PPTX
Introduction to Arduino Microcontroller
ODP
Introduction to Arduino
PDF
Microcontroleur arduino uno
PDF
Arduino uno
PDF
ARDUINOLIKE BOARDS: A SHORT HARDWARE REFERENCE GUIDE FOR MAKERS
PPTX
Buy arduino uno cheap
PDF
物聯網概論 - Arduino
PDF
Introduction to Arduino
PDF
AWS SQS for better architecture
PPTX
AWS SQS SNS
PPTX
Pengantar Raspberry Pi
PPTX
Robotic spray painter
PPTX
Automatic Lamp using Arduino UNO, LDR and RTC DS1307
Introduction to arduino
Arduino Full Tutorial
Arduino Presentation
Arduino
Raspberry pi
IOT Based Home Automation using Raspberry Pi-3
Introduction to raspberry pi
Introduction to Arduino Microcontroller
Introduction to Arduino
Microcontroleur arduino uno
Arduino uno
ARDUINOLIKE BOARDS: A SHORT HARDWARE REFERENCE GUIDE FOR MAKERS
Buy arduino uno cheap
物聯網概論 - Arduino
Introduction to Arduino
AWS SQS for better architecture
AWS SQS SNS
Pengantar Raspberry Pi
Robotic spray painter
Automatic Lamp using Arduino UNO, LDR and RTC DS1307

Similar to Arduino technical session 1

PPTX
Basics of open source embedded development board (
PPTX
Basics of open source embedded development board (
PDF
Arduino talk
PDF
Arduino talk
PDF
Arduino talk
PPTX
An Introduction To Arduino.pptx
 
PDF
SKAD Electronics Training Manual.pdf
DOC
Intro arduino
PPTX
What is arduino? and its type
DOCX
Interoperability in Internet of Things (IOT)
PDF
Arduino fast prototyping
PPT
Unit 2-IoT.ppt Introduction to Elements of IOT
PDF
4 Introduction to Arduino.pdf
PPT
Unit 2-IoT.ppt Elements of IOT And Its Feature
PDF
WORKING PRINCIPLE OF ARDUINO AND USING IT AS A TOOL FOR STUDY AND RESEARCH
PDF
WORKING PRINCIPLE OF ARDUINO AND USING IT AS A TOOL FOR STUDY AND RESEARCH
PDF
Report on arduino
PPTX
BURO Arduino Workshop
PDF
WorkShop on Arduino
PPTX
Introduction to Arduino
Basics of open source embedded development board (
Basics of open source embedded development board (
Arduino talk
Arduino talk
Arduino talk
An Introduction To Arduino.pptx
 
SKAD Electronics Training Manual.pdf
Intro arduino
What is arduino? and its type
Interoperability in Internet of Things (IOT)
Arduino fast prototyping
Unit 2-IoT.ppt Introduction to Elements of IOT
4 Introduction to Arduino.pdf
Unit 2-IoT.ppt Elements of IOT And Its Feature
WORKING PRINCIPLE OF ARDUINO AND USING IT AS A TOOL FOR STUDY AND RESEARCH
WORKING PRINCIPLE OF ARDUINO AND USING IT AS A TOOL FOR STUDY AND RESEARCH
Report on arduino
BURO Arduino Workshop
WorkShop on Arduino
Introduction to Arduino

Recently uploaded

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
Vibe Coding vs. Spec-Driven Development [Free Meetup]
PPTX
Cloud-and-AI-Platform-FY26-Partner-Playbook.pptx
PDF
December Patch Tuesday
 
PDF
ElyriaSoftware — Powering the Future with Blockchain Innovation
PDF
Security Forum Sessions from Houston 2025 Event
PDF
Unser Jahresrückblick – MarvelClient in 2025
PPTX
Cybersecurity Best Practices - Step by Step guidelines
PDF
Digit Expo 2025 - EICC Edinburgh 27th November
PDF
Day 3 - Data and Application Security - 2nd Sight Lab Cloud Security Class
PPTX
Software Analysis &Design ethiopia chap-2.pptx
PDF
Decoding the DNA: The Digital Networks Act, the Open Internet, and IP interco...
PDF
Unlocking the Power of Salesforce Architecture: Frameworks for Effective Solu...
PPTX
Building Cyber Resilience for 2026: Best Practices for a Secure, AI-Driven Bu...
PDF
Eredità digitale sugli smartphone: cosa resta di noi nei dispositivi mobili
PPTX
Data Privacy and Protection: Safeguarding Information in a Connected World
PPTX
cybercrime in Information security .pptx
PPTX
AI in Cybersecurity: Digital Defense by Yasir Naveed Riaz
PDF
Our Digital Tribe_ Cultivating Connection and Growth in Our Slack Community 🌿...
Kanban India 2025 | Daksh Gupta | Modeling the Models, Generative AI & Kanban
iRobot Post‑Mortem and Alternative Paths - Discussion Document for Boards and...
Vibe Coding vs. Spec-Driven Development [Free Meetup]
Cloud-and-AI-Platform-FY26-Partner-Playbook.pptx
December Patch Tuesday
 
ElyriaSoftware — Powering the Future with Blockchain Innovation
Security Forum Sessions from Houston 2025 Event
Unser Jahresrückblick – MarvelClient in 2025
Cybersecurity Best Practices - Step by Step guidelines
Digit Expo 2025 - EICC Edinburgh 27th November
Day 3 - Data and Application Security - 2nd Sight Lab Cloud Security Class
Software Analysis &Design ethiopia chap-2.pptx
Decoding the DNA: The Digital Networks Act, the Open Internet, and IP interco...
Unlocking the Power of Salesforce Architecture: Frameworks for Effective Solu...
Building Cyber Resilience for 2026: Best Practices for a Secure, AI-Driven Bu...
Eredità digitale sugli smartphone: cosa resta di noi nei dispositivi mobili
Data Privacy and Protection: Safeguarding Information in a Connected World
cybercrime in Information security .pptx
AI in Cybersecurity: Digital Defense by Yasir Naveed Riaz
Our Digital Tribe_ Cultivating Connection and Growth in Our Slack Community 🌿...

Arduino technical session 1

  • 1.
    1Arduino Board: ArduinoUNOArduino Programing Environment: Arduino 0022Download @ http://arduino.cc/en/Main/Software.
  • 2.
    2*Download Arduino Softwarefrom Arduino.cc and unzip the folder to your computer. Afile within the folder called Arduino, allows you to launch the programming environment.*You need to install a driver that comes with Arduino to be able to communicate withthe board
  • 3.
    3USB7-12 v3 vGRD5vAnalog Input PinsDigital Input/Output PinsPins with ~ are PWM[Analog Output]GRDTransmitter/ReceiverSerial ConnectionMicrocontroller ATmega328Operating Voltage 5VInput Voltage (recommended)7-12VInput Voltage (limits)6-20VDigital I/O Pins 14(of which 6 provide PWM output)Analog Input Pins 6DC Current per I/O Pin 40 mADC Current for 3.3V Pin 50 mA
  • 4.
  • 5.
  • 6.
  • 7.
    Other Hardware Choices-BoardsArduinoBTThe Arduino BT is an Arduino board with built-in bluetooth module,allowing for wireless communication.LilyPad ArduinoThe LilyPad Arduino is a microcontroller board designed for wearablesand e-textiles. It can be sewn to fabric and similarly mounted powersupplies, sensors and actuators with conductive thread.Arduino NanoArduino Nano is a surface mount breadboard embedded version withintegrated USB. It is a smallest, complete, and breadboard friendly. Ithas everything that Diecimila has (electrically) with more analog inputpins and onboard +5V AREF jumper.7
  • 8.
    Other Hardware Choices-SheildsXbeeShieldThe Xbee shield allows an Arduino board to communicate wirelessly using Zigbee. The module cancommunicate up to 100 feet indoors or 300 feet outdoors (with line-of-sight). It can be used as aserial/usb replacement or you can put it into a command mode and configure it for a variety ofbroadcast and mesh networking options.The Xbee shield was created in collaboration with Libelium, who developed it for use in their SquidBeemotes (used for creating sensor networks).Adafruit Servo/Stepper/DC Motor shieldA shield that can control 2 hobby servos and up to 2 unipolar/bipolar stepper motors or 4 bi-directionalDC motors.Battery ShieldA shield from Liquidware that connects to the back of the Arduino, with a USB-rechargable lithium ionbattery that can power an Arduino for 14-28 hours depending on the circuitLiquidware TouchShieldOLED touch screen shield.Adafruit Wave shieldPlays any size 22KHz audio files from an SD memory card for music, effects and interactive sound artAdafruit GPS & Datalogging shieldConnects up a GPS module and can log location, time/date as well as sensor data to an SD memoryflash card.Adafruit XPort/Ethernet shieldAllows use of an XPort module for connecting to the Internet as a client or server. 8
  • 9.
    Other Hardware Choices-SheildsAdafruitGPS & Datalogging shieldConnects up a GPS module and can log location,time/date as well as sensor data to an SD memoryflash card.Adafruit XPort/Ethernet shieldAllows use of an XPort module for connecting to theInternet as a client or server.http://ladyada.net9
  • 10.
    Other Hardware Choices-SheildsLiquidwareTouchShieldOLED touch screen shield.http://www.liquidware.comAdafruit Servo/Stepper/DC Motor shieldA shield that can control 2 hobby servos and up to 2unipolar/bipolar stepper motors or 4 bi-directionalDC motors.http://ladyada.net10
  • 11.
    USB Cable Ato B - 6 and 10 Feet/ USB miniB Cable - 6 FootThis USB Cable type is the one that allows for connecting normal Arduino Boards to the computer. They come in black and white and in various lengths. ForArduino Mini Pro and Lilypad you need USB miniB for connecting to computer.http://www.sparkfun.com/commerce/product_info.php?products_id=512http://www.sparkfun.com/commerce/product_info.php?products_id=513http://www.sparkfun.com/commerce/product_info.php?products_id=598
  • 12.
    USB Cable Extension- 6 Foot/ USB Cable A to A - 6 and 10 FootThese extension cables have a type A male connector on one end that plugs into any computer. The opposing end has a female type A connector allowing asecond USB cable to be inserted. This allows as many cables to be daisy chained together as needed. May come in White or Black, and in 6 feet. For moreextension you can combine USB cable extension with a USB A to A cable.http://www.sparkfun.com/commerce/product_info.php?products_id=517http://www.sparkfun.com/commerce/product_info.php?products_id=516http://www.sparkfun.com/commerce/product_info.php?products_id=515
  • 13.
    Arduino BoardsThis isthe new Arduino Uno. In addition to all the features of the previous board, the Uno now uses an ATmega8U2 instead of the FTDI chip. This allows forfaster transfer rates, no drivers needed for Linux or Mac (inf file for Windows is needed), and the ability to have the Uno show up as a keyboard, mouse,joystick, etc.The Arduino Mega is a microcontroller board based on the ATmega2560. It has 54 digital input/output pins (of which 14 can be used as PWM outputs), 16analog inputs, 4 UARTs (hardware serial ports), a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. It containseverything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started.The Mega is compatible with most shields designed for the Arduino Duemilanove or Diecimila. This is the new Arduino Mega 2560. In addition to all the featuresof the previous board, the Mega 2560 now uses an ATmega8U2 instead of the FTDI chip. This allows for faster transfer rates, no drivers needed for Linux orMac (inf file for Windows is needed), and the ability to have the board show up as a keyboard, mouse, joystick, etc. It also has twice as much flash memory.Other variaitions of arduino are Arduino pro, Arduino Mini Pro and Lilypad Arduino .http://www.sparkfun.com/commerce/product_info.php?products_id=9950http://www.sparkfun.com/commerce/product_info.php?products_id=9949http://www.sparkfun.com/commerce/tutorial_info.php?tutorials_id=148
  • 14.
    Arduino Project Enclosure/Crib for Arduino - Metal EnclosureThe Arduino enclosure allows you to easily enclose your Arduino main board, Arduino Mega, or any other board that fits the Arduino foot print (FEZ Domino,FEZ Panda, Netduino, etc). It simply presses shut, so you don't have to worry about screws or fasteners. It has room internally for an Arduino and a shield. Iteven has a removable tab mated for use with an Ethernet shield. It also has a snap-in compartment in the back for accessing switches or connections or batteryaccess.Made from sturdy, lightweight powder-coated aluminum, the Crib for Arduino can accommodate either an Arduino Duemilanove or Arduino Mega with headroom to spare for a shield like an Ethernet shield. This enclosure weighs only 5.6 oz (159 g) and is structurally very strong. The baseplate is pre-drilled with holepatterns for both Arduino boards(Main and Mega so you get perfect alignment and no hole drilling for board mounting. Use the snap-in standoffs to quicklymount your board and go. Flanges on the lid let you mount your project anywhere with just 4 screws. Bolt it securely under your desk or to the ceiling! Or justinsert four rubber feet (not included) into the flange holes so your Arduino project can sit on your desk and not scratch it.http://www.sparkfun.com/commerce/product_info.php?products_id=10088http://www.sparkfun.com/commerce/product_info.php?products_id=10033
  • 15.
    Wall Adapter PowerSupply - 9VDC 650mA/ Wall Adapter Power Supply - 12VDC 600mA9VDC is High quality switching 'wall wart' AC to DC 9V 650mA wall power supply manufactured specifically for Spark Fun Electronics. These are switch modepower supplies which mean the output is regulated to 9V and the capable output current is much higher (650mA!). These will power most projects that don'trequire more than 650mA of current. Center-positive 5.5x2.1mm barrel connector.Works with 100-240VAC inputs.12VDC is a high quality AC to DC 'wall wart' which produces a regulated output of 12VDC at up to 600mA. These are switch mode power supplies which meansthe output is regulated to 12V and the capable output current is much higher (600mA!). These will power most projects that don't require more than 650mA ofcurrent. Center-positive 5.5x2.1mm barrel connector. Works with 100-240VAC inputs.http://www.sparkfun.com/commerce/product_info.php?products_id=298http://www.sparkfun.com/commerce/product_info.php?products_id=9442
  • 16.
    9V to BarrelJack AdapterPlug a 9V battery into one end and connect the other end to anything with a 5.5x2.1mm, center-positive barrel jack. Use this cable to battery-power any devicethat needs 9V and has an on-board barrel jack - it works great for Arduinos, development boards, evaluation boards, and more!http://www.sparkfun.com/commerce/product_info.php?products_id=9518
  • 17.
    Battery Holder -4xAA to Barrel Jack ConnectorThis is a simple 4 cell AA battery holder. The 5 inch cable is terminated with a standard 5.5x2.1mm, center positive barrel jack connector. The connector mateswith the barrel jack on the Arduino (among a number of other products) allowing you to easily make your project battery powered. Note: the average voltageregulator has about 1V of dropout (but can vary greatly). This pack, with normal alkaline batteries, will output ~5.5V causing a normal 5V board to run at around4 to 4.5V. This depends a lot of what board and processor you are using with the battery pack. Please consult your datasheet.http://www.sparkfun.com/commerce/product_info.php?products_id=9835
  • 18.
    9V Solar &battery power supplyThe 9V Solar & battery power supply is specially designed for Arduino and other microcontroller project alike. It can be used as a portable power supply, and iscapable of delivering 9V, 500mA power. It can be charged by your PCB USB port or by sun-light or in-door light sources. It has following features:http://www.nuelectronics.com/estore/index.php?main_page=product_info&products_id=13
  • 19.
    Long life LithiumBackpack Batteries for ArduinoThese are long-life batteries particularly designed for Arduino. There is also a variation for Arduino Mega. Depending on how much juice you need, get these inlow, medium, or high capacity. Bare battery PCB matches the size of the Arduino . High Capacity 2200mAh Lithium Ion Battery provides 29 Standby ArduinoHours. Medium Capacity 1000mAh Lithium Ion Battery provides 15 Standby Arduino Hours. Low Capacity 600mAh Lithium Ion Battery provides 9.4 StandbyArduino Hours. It is rechargeable via Arduino USB or via USB Tybe-B Mini Cable and supplies regulated 5V and 3.3V .http://www.liquidware.com/shop/show/bp/lithium+backpackhttp://www.liquidware.com/shop/show/BPM/http://antipastohw.blogspot.com/2008/06/how-to-install-lithium-backpack-to-your.html
  • 20.
    Jumper wires withF/F, F/M and M/M connecting endsThese are easy to use jumper wires terminated as male to female, male to male or female to female for connections.http://www.sparkfun.com/commerce/product_info.php?products_id=9386http://www.sparkfun.com/commerce/product_info.php?products_id=8431http://www.sparkfun.com/commerce/product_info.php?products_id=8430
  • 21.
    Color Coded Flat(Ribbon)/Coded Flat (Ribbon)These are easy to use jumper wires terminated as male to female, male to male or female to female for connections.http://www.newark.com/jsp/search/productdetail.jsp?SKU=23M8844&CMP=AFC-GB100000001http://www.allelectronics.com/make-a-store/item/RCBL-10TF/10-CONDUCTOR-TWIST-FLAT-RIBBON-CABLE/1.htmlhttp://www.allelectronics.com/make-a-store/item/RCBL-9/9-CONDUCTOR-FLAT-RIBBON-CABLE/1.htmlhttp://solutions.3m.com/wps/portal/3M/en_US/Interconnect/Home/Products/ProductCatalog/Catalog/?PC_7_RJH9U5230O73D0ISNF9B3C3SI1_nid=855TBYZXVNit6Z44P5GPWMglD2FDQK85M6bl
  • 22.
    Conductive ThreadConductive threadis a creative way to connect various electronics onto clothing. This thread can carry current for power and signals. While not as conductive astraces on a printed circuit board (PCB), this thread makes wearable clothing 'wearable'!http://www.sparkfun.com/commerce/product_info.php?products_id=8544http://www.sparkfun.com/commerce/product_info.php?products_id=8549
  • 23.
    ProtoboardProtoboards provide afree canvass for devising soldered circuit compositions. They come in different colors and sizes.http://www.sparkfun.com/commerce/product_info.php?products_id=8619http://www.sparkfun.com/commerce/product_info.php?products_id=8708http://www.sparkfun.com/commerce/product_info.php?products_id=8808http://www.sparkfun.com/commerce/product_info.php?products_id=8814http://www.sparkfun.com/commerce/product_info.php?products_id=8809http://www.sparkfun.com/commerce/product_info.php?products_id=8847http://www.sparkfun.com/commerce/product_info.php?products_id=8885http://www.sparkfun.com/commerce/product_info.php?products_id=8887
  • 24.
    Solderless BreadboardTo freeyourself from the pain of soldering and also from the risk of ruining your components it is advisable to your breadboards. Breadboards come in differentsizes and even colorshttp://www.sparkfun.com/commerce/product_info.php?products_id=9567http://www.sparkfun.com/commerce/product_info.php?products_id=8800http://www.sparkfun.com/commerce/product_info.php?products_id=8802http://www.sparkfun.com/commerce/product_info.php?products_id=8803http://www.sparkfun.com/commerce/product_info.php?products_id=137http://www.sparkfun.com/commerce/product_info.php?products_id=7916
  • 25.
    Breadboard Power SupplyStick 5V/3.3VThis is a very simple board that takes a 6-12V input voltage and outputs a selectable 5V or 3.3V regulated voltage. All headers are 0.1" pitch for simple insertioninto a breadboard. Input power can be supplied to either the DC barrel jack or the two pin header labeled + and -. Output power is supplied to the pins labeledGND and VCC. Board has both an On/Off switch and a voltage select switch (3.3V/5V).http://www.sparkfun.com/commerce/product_info.php?products_id=9319
  • 26.
    Micro SD Shield–Data Logger Shield for ArduinoRunning out of memory space in your Arduino project? The microSD Shield equips your Arduino with mass-storage capability, so you can use it for data-loggingor other related projects. Communication with microSD cards is achieved over an SPI interface. The SCK, DI, and DO pins of the microSD socket are brokenout to the ATmega168/328's standard SPI pins (digital 11-13), while the CS pin is broken out to Arduino's D8 pin. If you decide to use one of the many opensource FAT libraries (like FAT16 or SDFat) make sure to change the code to reflect the location of the CS pin. Most libraries assume the CS pin is connected toD10; this will have to be changed to D8. Also for the libraries to work pin D10 will have to be set as an output in the 'setup()' section of your sketch. The shieldalso includes a large prototyping area with a 13x12 grid of 0.1" pitch PTHs. This shield comes populated with a microSD socket, red power indicator LED, and areset button; but it does not come with headers installed. We recommend the 6 and 8-pin stackable headers.http://www.sparkfun.com/commerce/product_info.php?products_id=9802
  • 27.
    XBEE Module andXBEE Shield for ArduinoThis is the very popular 2.4GHz XBee module from Digi (formally Maxstream). These modules take the 802.15.4 stack (the basis for Zigbee) and wrap it into asimple to use serial command set. These modules allow a very reliable and simple communication between microcontrollers, computers, systems, reallyanything with a serial port! Point to point and multi-point networks are supported.The XBee Shield simplifies the task of interfacing an XBee with your Arduino. This board mates directly with an Arduino Pro and equips it with wirelesscommunication capabilities using the popular XBee module. This unit works with all XBee modules including the Series 1 and Series 2.5, standard and Proversion. The serial pins (DIN and DOUT) of the XBee are connected through an SPDT switch, which allows you to select a connection to either the UART pins(D0, D1) or any digital pins on the Arduino (D2 and D3 default). Power is taken from the 5V pin of the Arduino and regulated on-board to 3.3VDC before beingsupplied to the XBee. The shield also takes care of level shifting on the DIN pin of the XBee. The board also includes LEDs to indicate power and activity onDIN, DOUT, RSSI, and DIO5 pins of the XBee. The Arduino's reset button is brought out on the shield, and a 12x11 grid of 0.1" holes are available forprototyping. The shield does not come with headers installed; we recommend the 6 and 8-pin stackable headers. The XBee module is also not included.http://www.sparkfun.com/commerce/product_info.php?products_id=9841http://www.sparkfun.com/commerce/product_info.php?products_id=8664http://www.sparkfun.com/commerce/product_info.php?products_id=8665
  • 28.
    Cellular Shield withSM5100B for ArduinoThe Cellular Shield for Arduino includes all the parts needed to interface your Arduino with an SM5100B cellular module. This allows you to easily add SMS,GSM/GPRS, and TCP/IP functionalities to your Arduino-based project. All you need to add cellular functionality to your Arduino project is a SIM card (pre-paid orstraight from your phone) and an antenna and you can start sending Serial.print statements to make calls, send texts and serve web pages! The maincomponents of the Cellular Shield are a 60-pin SM5100B connector, a SIM card socket, and an SPX29302 voltage regulator configured to regulate theArduino's raw voltage to 3.8V. The board's red LED indicates power. The Arduino's reset button is also brought out on the shield. Two jumpers on the boardallow you to select which serial pins interface with the cellular module - software (D2, D3) or hardware (D0, D1). There is also a 5-pin, 0.1" spaced header withconnections for microphone inputs and speaker outputs. Headers are not soldered on, w e recommend the 6 and 8-pin stackable headers. The SM5100Bcellular module is included with this product, however the SMA to u.FL connector is not. It is pre-configured to 9600bps.http://www.sparkfun.com/commerce/product_info.php?products_id=9607http://www.sparkfun.com/commerce/product_info.php?products_id=9145
  • 29.
  • 30.
  • 31.
    Arduino-Digital OutputDigital Output is defined as sending on/off or 0/1 signals from one of the digital pins on theAurduino board (pin 2-13) to the electronic actuator that recognize on/off or 0/1 signal.The so-called digital pins are highlighted here.31
  • 32.
    Arduino-Digital Output-LEDLED (LightEmitting Diode) is a light feature that can be used as an actuator of the space.Being a Diode, an LED is a directional piece meaning that it is activated only if it is placed in thecircuit in the right directionGround PinDigital Pin32
  • 33.
    Arduino-Ground PinFor electricityto flow in a circuit, we need difference in level of electricity energy. In Arduinoboard this difference is provided by making a circuit between one of the output pins and groundpin.When we send a signal through output pin any signal that is not 0 or LOW will provide thedesired difference between the two ends of the circuit and will result in electricity flow betweenthe digital output pin and ground pin- The level of electricity energy at Ground pin is zero, as aresult any non zero signal on the digital pin gives us a difference and an electricity flow.You can also create this situation using two output pins, one sending the low signal and onesending a high signal. The low signal pin in this case will function as the ground.33
  • 34.
    Arduino-Digital Output-LEDLEDs comein different colors and shapes.34
  • 35.
  • 36.
  • 37.
    void setup(){pinMode(13, OUTPUT);}voidloop(){digitalWrite(13, HIGH);delay(1000);digitalWrite(13, LOW);delay(1000);}Arduino-Digital Output-LED37
  • 38.
  • 39.
  • 40.
    Arduino-Compiling and UploadingCode1. Write the code2. Compile the code3. Check Arduino Port Connection4. Upload the Code5. The Arduino and Connected Circuits start to show behavior based on the uploaded code40
  • 41.
  • 42.
    Arduino-Digital Output-LEDThe Boardshould be connected to the computer in order to upload the program from arduinoenvironment to the board. Once the program is uploaded, if there is no realtime data beingcommunicated between the board and the program there is no need for the board to beconnected any more. Thus you can change the power to Ext(external Power) as opposed toUSB(power from USB) and use a battery or a power adaptor to power the board.In the case of the LED exercise since after uploading there is no data being communicatedbetween the board and the computer, you can disconnect the piece and make it a independentdisconnected piece.42
  • 43.
    Arduino-Using SolderlessBreadboardSolderless Boardis useful to build prototypes, as fast as possible without going throughtiresome and time consuming process of soldering parts together to make connections43
  • 44.
    Arduino-Using SolderlessBreadboardSolderless Boardis useful to build prototypes, as fast as possible without going throughtiresome and time consuming process of soldering parts together to make connectionsMost important thing in using a solderless breadboard in understanding its connections andwiring underneath the white cover to be able to connect parts in a way that complete andflawless lines are provided for electricity flow44
  • 45.
    Arduino-Using SolderlessBreadboardSolderless Boardis useful to build prototypes, as fast as possible without going throughtiresome and time consuming process of soldering parts together to make connectionsMost important thing in using a solderless breadboard in understanding its connections andwiring underneath the white cover to be able to connect parts in a way that complete andflawless lines are provided for electricity flow45
  • 46.
    Arduino-Using SolderlessBreadboardFor examplethis is how an LED can be connected to an Arduino board using a solderlessbreadboard.*we are using color codes in wiring. Red wire is connected to output pin and black wire isconnected to Ground46
  • 47.
    Arduino-Using SolderlessBreadboardFor examplethis is how an LED can be connected to an Arduino board using a solderlessbreadboard. The red dotted line shows the flow of electricity from the digital output pin to LEDand then ground pin.47
  • 48.
    Arduino-Using SolderlessBreadboardUsing aSolderless breadboard does not make that much of sense if we are only connecting oneLED to the board with one in and one out wire connected to it. It is best suited when we want tohave multiple elements connected to one or multiple pins.For example what if we want to control multiple LEDs from one digital output pin on Arduinoboard?48
  • 49.
    Arduino-Connecting Multiple ActuatorstoSingle Output Pin-Serial ConnectionGround PinDigital PinIn Serial connection, adding more electricity consuming elements results in weaker electricityflow. In case of Arduino Board adding more than three High intensity LEDs will result in so weakan electricity flow that the LEDs will not turn onAlso, in Serial connection, disconnecting any element of the connection-i.e. disconnecting one ofthe LEDs will result in breaking the circuit and as a result electricity will stop flowing and thewhole circuit will not work anymore49
  • 50.
    Arduino-Connecting Multiple ActuatorstoSingle Output Pin-Serial ConnectionSerial Connection on Solderless Board-The left diagram shows the electricity flow in the circuit.50
  • 51.
    Arduino-Connecting Multiple ActuatorstoSingle Output Pin-Parallel ConnectionGround Pin Digital PinIn Parallel connection, adding more electricity consuming elements do not result in decrease ofelectricity flowAlso, in Parallel connection, disconnecting any element of the connection-i.e. disconnecting oneof the LEDs will not result in breaking the circuit since each element is individually connected toboth digital output pin and ground pin.51
  • 52.
    Arduino-Connecting Multiple ActuatorstoSingle Output Pin-Parallel ConnectionParallel Connection on Solderless Board.52
  • 53.
    Arduino-Analog Output-LEDAnalog Output is defined as sending signals from one of the digital pins on the Aurduino boardthat range between two extremes: 0-255Out of 13 Digital pins on Arduino board the following pins can be used to signal out Analogoutput: 3,5,6,9,10,11These are the pins with PWM label next to them on the board53
  • 54.
    Arduino-Analog Output-LEDFor thisexercise since we need to see the light variations , we are going to use a high intensityLED. High Intensity LEDs emit more light than normal LEDs and it is easier to detect lightvariations, using them.54
  • 55.
  • 56.
    Arduino-Analog Output-LED//pin 11,10,9,6,5,3can be used for Analog outputvoid setup(){pinMode(11, OUTPUT); // Specify Arduino Pin number and output/input mode}void loop(){analogWrite(11, 255); // sending Analog output 255delay(500); // Wait for half a secondanalogWrite(11, 200); // Sending Analog output 200delay(500); // Wait for half a secondanalogWrite(11, 150); // Sending Analog output 150delay(500); // Wait for half a secondanalogWrite(11, 100); // Sending Analog output 100delay(500); // Wait for half a secondanalogWrite(11, 50); // Sending Analog output 50delay(500); // Wait for half a secondanalogWrite(11, 0); // sending analog output 0delay(500); // Wait for half a second}56
  • 57.
  • 58.
    Arduino-Analog Output-LED_Dimming UsingLoopStructure//pin 11,10,9,6,5,3 can be used for Analog outputvoid setup(){pinMode(11, OUTPUT); // Specify Arduino Pin number and output/input mode}void loop(){for(int i=255; i>0; i--){analogWrite(11, i); // sending Analog output 255delay(20);}for(int i=0; i<255; i++){analogWrite(11, i); // sending Analog output 255delay(20);}}58
  • 59.
    Arduino-Controlling Multiple Actuatorsseparatelyfrom different output pins59Follow the above diagram to assemble your circuit:Black represents the wiring that is connected to groundRed represents wiring that is connected to Aurdoino output pinsYellow represents wiring that is providing connections on Solderless Board to create seamlesselectricity flow for the Ground Line that we are creating. LEDs are seperately connected to digitalpins while are all connected to the same Ground pin via a Ground Line on the solderless board
  • 60.
    Arduino-Controlling Multiple Actuatorsseparatelyfrom different output pins-Sequencing60
  • 61.
    Arduino-Controlling Multiple Actuatorsseparatelyfrom different output pins-Sequencingvoid setup(){pinMode(2, OUTPUT); // Specify Arduino Pin number and output/input modepinMode(3, OUTPUT); // Specify Arduino Pin number and output/input modepinMode(4, OUTPUT); // Specify Arduino Pin number and output/input modepinMode(5, OUTPUT); // Specify Arduino Pin number and output/input modepinMode(6, OUTPUT); // Specify Arduino Pin number and output/input modepinMode(7, OUTPUT); // Specify Arduino Pin number and output/input modepinMode(8, OUTPUT); // Specify Arduino Pin number and output/input mode}void loop(){for(int i=2; i<9; i++){//iterating through pin 2 to 8 and turning them on one by onedigitalWrite(i,HIGH); //Sending High Signal to Pindelay(1000); //Wait 1 second}for(int i=9; i>2; i--){//iterating through pin 8 to 2 and turning them off one by onedigitalWrite(i,LOW); //Sending LOW Signal to Pindelay(1000); //Wait 1 second}}61
  • 62.
    Arduino-Controlling Multiple Actuatorsseparatelyfrom different output pins-Sequencing62
  • 63.
    Arduino-Controlling Multiple Actuatorsseparatelyfrom different output pins-Random Patterns63
  • 64.
    Arduino-Controlling Multiple Actuatorsseparatelyfrom different output pins-Random Patternsvoid setup(){pinMode(2, OUTPUT); // Specify Arduino Pin number and output/input modepinMode(3, OUTPUT); // Specify Arduino Pin number and output/input modepinMode(4, OUTPUT); // Specify Arduino Pin number and output/input modepinMode(5, OUTPUT); // Specify Arduino Pin number and output/input modepinMode(6, OUTPUT); // Specify Arduino Pin number and output/input modepinMode(7, OUTPUT); // Specify Arduino Pin number and output/input modepinMode(8, OUTPUT); // Specify Arduino Pin number and output/input mode}void loop(){for(int i=2; i<9; i++){//iterating through pin 2 to 8 and turning them on/off randomlyint signal=int(random(0,2));digitalWrite(i,signal); //Sending High Signal to Pin}delay(1000); //Wait 1 second}64
  • 65.
    Arduino-Controlling Multiple Actuatorsseparatelyfrom different output pins-Random Patterns65
  • 66.
    Arduino-Controlling Multiple Actuatorsseparatelyfrom different output pins-Random PatternsAside from introduction of randomness, payattention to how changing the place of delay()function can change the systems behavior. Here we put the delay function out side of the forloop. As a result instead of seeing the change for each actuator one by one in a sequence, whichis the case in the previous exercise, here, at first all the actuators(LEDs) are configured togetherand then the system pauses for one second to let us see the over all configuration. 66
  • 67.
    67Arduino-Controlling Actuators BasedonInput from Arduino Serial Port
  • 68.
    68Arduino-Controlling Actuators BasedonInput from Arduino Serial Port//pin 11,10,9,6,5,3 can be used for Analog outputint serialNumber=0;int lightIntensityValue=0;void setup(){Serial.begin(9600);pinMode(11, OUTPUT); // Specify Arduino Pin number and output/input mode}void loop(){int value=Serial.read();Serial.println(value);if(value!=-1 && value!=10){serialNumber=serialNumber*10+(value-48);}if(value==10){lightIntensityValue=serialNumber%255;Serial.print("Number Recieved from Serial Port:");Serial.println(serialNumber);serialNumber=0;}analogWrite(11,lightIntensityValue);delay(1000);}1. Data is received from Serial port as ASCII codes.2. If data is numerical, each digit is sent separately.3. ASCII code of zero is 484. To calculate the numerical value of a digit from its ASCI code: digit=ASCII-485. At the end of a package the serial port send a number 106. If nothing is passed to the serial port, the port sends number -1 as default
  • 69.
    void setup(){pinMode(13,OUTPUT);pinMode(12,OUTPUT);pinMode(11,OUTPUT);pinMode(10,OUTPUT);}void loop(){digitalWrite(11,LOW);digitalWrite(13,HIGH);digitalWrite(12,LOW);digitalWrite(10,LOW);delay(1000);digitalWrite(13,LOW);digitalWrite(12,HIGH);digitalWrite(10,LOW);delay(1000);digitalWrite(13,LOW);digitalWrite(12,LOW);digitalWrite(10,HIGH);delay(1000);}3-ColorLED**Make sure you are not doing the circuit vice versa!!!** Sometimes the long leg should be high and the legwhich is low would determine the color of the lightDigital Pin13LOW/HIGH Digital Pin12LOW/HIGHDigital Pin10LOW/HIGHDigital Pin11LOW69
  • 70.
    Arduino-Digital Output-Sound-PiezoA Piezois an electronic piece that converts electricity energy to sound. It is a digital outputdevice. You can make white noise or even exact musical notes ( frequencies for musical notes)based on the duration that you iterate between HIGH and LOW signals.A Piezo is a directional piece, meaning that it has a positive and negative pole. The positive poleshould be connected to the digital output pin that you allocate to control the piezo and thenegative pole should be connected to Ground pin70
  • 71.
  • 72.
    Arduino-Digital Output-Sound-Piezo//connect piezoto pin 13 and groundint freqs[] = {1915, 1700, 1519, 1432, 1275, 1136, 1014, 956};//string tones[] = {"do", "re", "mi", "fa","sol"," la", "si", "do"};void setup(){pinMode(13,OUTPUT);}void loop(){for(int i=0;i<8;i++){//iterating through notesfor(int j=0;j<1000;j++){//the time span that each note is being playeddigitalWrite(13,HIGH);delayMicroseconds(freqs[i]);digitalWrite(13,LOW);delayMicroseconds(freqs[i]);}}}72
  • 73.
  • 74.
    Arduino-Digital Output-Sound-Piezo-Playing amelody//connect piezo to pin 13 and groundvoid playNote(int note){for(int j=0;j<60;j++){//the time span that each note is being playeddigitalWrite(13,HIGH);delayMicroseconds(note);digitalWrite(13,LOW);delayMicroseconds(note);}delay(60);}int pause=200;int freqs[] = {1915, 1700, 1519, 1432, 1275, 1136, 1014, 956};//string tones[] = {"do", "re", "mi", "fa","sol"," la", "si", "do"};// i = { 0 1 2 3 4 5 6 7//mi mi mi - mi mi mi - mi sol do re mi - - - fa fa fa fa fa mi mi mi mi re re mi re - sol - mi mi mi - mi mi mi - mi sol do re mi -- fa fa fa fa fa mi mi mi sol sol fa re do - - -void setup(){pinMode(13,OUTPUT);}void loop(){playNote(freqs[2]); playNote(freqs[2]); playNote(freqs[2]); delay(pause);playNote(freqs[2]); playNote(freqs[2]); playNote(freqs[2]); delay(pause);playNote(freqs[2]); playNote(freqs[4]); playNote(freqs[0]); playNote(freqs[1]);playNote(freqs[2]); delay(pause); delay(pause); delay(pause);playNote(freqs[3]); playNote(freqs[3]); playNote(freqs[3]); playNote(freqs[3]);playNote(freqs[3]); playNote(freqs[2]); playNote(freqs[2]); playNote(freqs[2]);playNote(freqs[2]); playNote(freqs[1]); playNote(freqs[1]); playNote(freqs[2]);playNote(freqs[1]); delay(pause); playNote(freqs[4]); delay(pause);playNote(freqs[2]); playNote(freqs[2]); playNote(freqs[2]); delay(pause);playNote(freqs[2]); playNote(freqs[2]); playNote(freqs[2]); delay(pause);playNote(freqs[2]); playNote(freqs[4]); playNote(freqs[0]); playNote(freqs[1]);playNote(freqs[2]); delay(pause); delay(pause); delay(pause);playNote(freqs[3]); playNote(freqs[3]); playNote(freqs[3]); playNote(freqs[3]);playNote(freqs[3]); playNote(freqs[2]); playNote(freqs[2]); playNote(freqs[2]);playNote(freqs[4]); playNote(freqs[4]); playNote(freqs[3]); playNote(freqs[3]);playNote(freqs[0]); delay(pause); delay(pause); delay(pause);}74
  • 75.
    Arduino-Same Signal MultipleInterpretationsIn the same setting if you connect an LED parallel to Piezo, you can see how the same signalcan be interpreted differently using a different output device that accept the same type ofsignals(in this case digital signal)75
  • 76.
    Arduino-DigitalOutput-Motion-Servo MotorServo Motorsare electronic devices that convert digital signal to rotational movement. There aretwo sorts of servo motors: Standard servos that their rotation is limited to maximum of 180degrees in each direction and Continuous Rotation Servos that can provide rotation unlimitedly inboth directions76
  • 77.
    A servo motoris a motor that pulses at a certain rate moving its gear at a certain angle. It hasthree connections: the black is ground, the red is connected to 5V, and the white (yellowwire here) is set to the digital pin.Arduino-DigitalOutput-Motion-Servo MotorGroundV5Digital Pin77
  • 78.
  • 79.
    Arduino-Standard Servo Rotationto Exact Angel#include <Servo.h>Servo myservo; // create servo object to control a servoint pos = 0; // variable to store the servo positionvoid setup(){myservo.attach(9); // attaches the servo on pin 9 to the servo object}void loop(){myservo.attach(9);for(pos = 0; pos < 180; pos += 1) // goes from 0 degrees to 180 degrees{ // in steps of 1 degreemyservo.write(pos); // tell servo to go to position in variable 'pos'delay(15); // waits 15ms for the servo to reach the position}for(pos = 180; pos>=1; pos-=1) // goes from 180 degrees to 0 degrees{myservo.write(pos); // tell servo to go to position in variable 'pos'delay(15); // waits 15ms for the servo to reach the position}myservo.detach(); //Detach the servo if you are not controling it for a whiledelay(2000);}79
  • 80.
  • 81.
    Arduino-Controlling Standard Servowith User Input#include <Servo.h>Servo myservo; // create servo object to control a servoint pos = 0; // variable to store the servo positionint angleValue=0;int serialNumber=0;void setup(){Serial.begin(9600);myservo.attach(9);}void loop(){int value=Serial.read();Serial.println(value);if(value!=-1 && value!=10){serialNumber=serialNumber*10+(value-48);}if(value==10){myservo.attach(9);angleValue=serialNumber%180;myservo.write(angleValue); // tell servo to go to position in variable 'pos'Serial.print("Number Recieved from Serial Port:");Serial.println(serialNumber);serialNumber=0;delay(250);}myservo.detach();}81
  • 82.
  • 83.
    As opposed tostandard Servo that its rotation is limited to 180 degrees both ways, a continuousrotation servo can keep rotating unlimitedly-again both ways- based on the frequency that ispulsed out to it. There is a specific frequency at which the Servo motor should be static andbeyond and before which the servo will change in its rotation direction.Arduino-DigitalOutput - Continuous RotationGroundV5Digital Pin83
  • 84.
    As opposed tostandard Servo that its rotation is limited to 180 degrees both ways, a continuousrotation servo can keep rotating unlimitedly-again both ways- based on the frequency that ispulsed out to it. There is a specific frequency at which the Servo motor should be static andbeyond and before which the servo will change in its rotation direction.There is a pin on the servo motor that enables us to adjust the servo for its static frequency.Arduino-Digital Output - Continuous Rotation-Adjustment84
  • 85.
    Arduino-Digital Output -Continuous Rotation-Adjustmentvoid setup(){pinMode(5,OUTPUT);}void loop(){for (int i = 0; i <= 200; i++){digitalWrite(5,HIGH);delayMicroseconds(1500); // 1.5ms This is the frequency at which the servo motor should be staticdigitalWrite(5,LOW);delay(20); // 20ms}}Upload the following code to the board and while the servo isconnected, try to adjust the pin until the servo motor is static.Once the servo is adjusted to this code any pulse grater than 1500 willresult in rotation in one direction while any pulse less than 1500 willresult in rotation in the other direction85
  • 86.
    Once the servois adjusted to this code any pulse graterthan 1500 will result in rotation in one direction while anypulse less than 1500 will result in rotation in the otherdirectionArduino-Digital Output - Continuous Rotation-Direction Change86
  • 87.
    Arduino-Digital Output -Continuous Rotation-Direction ChangeOnce the servo is adjusted to this code any pulse graterthan 1500 will result in rotation in one direction while anypulse less than 1500 will result in rotation in the otherdirectionvoid setup(){pinMode(5,OUTPUT);}void loop(){//Rotating in One directionfor (int i = 0; i <= 200; i++){digitalWrite(5,HIGH);delayMicroseconds(1800);digitalWrite(5,LOW);delay(20); // 20ms}//Stopfor (int i = 0; i <= 200; i++){digitalWrite(5,HIGH);delayMicroseconds(1500);digitalWrite(5,LOW);delay(20); // 20ms}//Rotating in the other directionfor (int i = 0; i <= 200; i++){digitalWrite(5,HIGH);delayMicroseconds(1200);digitalWrite(5,LOW);delay(20); // 20ms}//Stopfor (int i = 0; i <= 200; i++){digitalWrite(5,HIGH);delayMicroseconds(1500);digitalWrite(5,LOW);delay(20); // 20ms}} 87
  • 88.
    Arduino-Digital Output -Continuous Rotation-Delayed StepsPlaying with delay() gives us pauses between rotationstepsvoid setup(){pinMode(5,OUTPUT);}void loop(){//Continious Rotationfor (int i = 0; i <= 20; i++){digitalWrite(5,HIGH);delayMicroseconds(1800);digitalWrite(5,LOW);delay(1);}//Rotating with delayed stepsfor (int i = 0; i <= 20; i++){digitalWrite(5,HIGH);delayMicroseconds(1800);digitalWrite(5,LOW);delay(100);}//More Delayfor (int i = 0; i <= 20; i++){digitalWrite(5,HIGH);delayMicroseconds(1800);digitalWrite(5,LOW);delay(200);}//More Delayfor (int i = 0; i <= 20; i++){digitalWrite(5,HIGH);delayMicroseconds(1800);digitalWrite(5,LOW);delay(400);}//More Delayfor (int i = 0; i <= 20; i++){digitalWrite(5,HIGH);delayMicroseconds(1800);digitalWrite(5,LOW);delay(800);}//More Delayfor (int i = 0; i <= 20; i++){digitalWrite(5,HIGH);delayMicroseconds(1800);digitalWrite(5,LOW);delay(1800);}}88
  • 89.
    Arduino-Digital Output -Continuous Rotation-Controlling Rotation AnglePlaying with the number of steps in the for loop gives usvariations in the span /Angle of the rotationvoid setup(){pinMode(5,OUTPUT);}void loop(){for (int i = 0; i <= 10; i++){digitalWrite(5,HIGH);delayMicroseconds(1800);digitalWrite(5,LOW);delay(20);}delay(1000);for (int i = 0; i <= 20; i++){digitalWrite(5,HIGH);delayMicroseconds(1800);digitalWrite(5,LOW);delay(20);}delay(1000);for (int i = 0; i <= 30; i++){digitalWrite(5,HIGH);delayMicroseconds(1800);digitalWrite(5,LOW);delay(20);}delay(1000);for (int i = 0; i <= 40; i++){digitalWrite(5,HIGH);delayMicroseconds(1800);digitalWrite(5,LOW);delay(20);}delay(1000);}89
  • 90.
    Arduino-Digital Output –Wind –Controlling a FanControlling a Fan is as easy as sending a HIGH or LOWSignal to the Pin that the fan is connected to.// Connect the fan to Pin 13 and Groundvoid setup(){pinMode(13, OUTPUT); // Specify Arduino Pin numberand output/input mode}void loop(){digitalWrite(13, HIGH); // Turn on Pin 13 sending aHIGH Signaldelay(1000); // Wait for one seconddigitalWrite(13, LOW); // Turn off Pin 13 sending aLOW Signaldelay(3000); // Wait for Three second}90
  • 91.
    Arduino-Digital Output –Rotation –Controlling a DCMotor// Connect to Pin 13 and Groundvoid setup(){pinMode(13, OUTPUT); // Specify Arduino Pin numberand output/input mode}void loop(){digitalWrite(13, HIGH); // Turn on Pin 13 sending aHIGH Signaldelay(1000); // Wait for one seconddigitalWrite(13, LOW); // Turn off Pin 13 sending aLOW Signaldelay(3000); // Wait for Three second}91// Connect to Pin 13 and 12void setup(){pinMode(13, OUTPUT); // Specify Arduino Pin numberand output/input modepinMode(12, OUTPUT);}void loop(){digitalWrite(13, HIGH); // Turn on Pin 13 sending aHIGH SignaldigitalWrite(12, LOW); //Make Pin 12 a Grounddelay(1000); // Wait for one seconddigitalWrite(13, LOW); // Make Pin 13 a GrounddigitalWrite(12, HIGH); // Turn on Pin 12 sending aHIGH Signaldelay(3000); // Wait for Three second}Code for Rotation/No RotationCode for CW and CCW Rotation
  • 92.
    V52345Stepper motors translatedigital switching sequences into motion.They are used in a variety of applications requiring precise motionsunder computer control.Unlike ordinary dc motors, which spin freely when power isapplied,steppers require that their power source be continuouslypulsed in specific patterns. These patterns, or step sequences,determine the speed and direction of a stepper’s motion.For each pulse or step input, the stepper motor rotates a fixedangular increment; typically 1.8 or 7.5 degrees.Steppers are driven by the interaction (attraction and repulsion) ofmagnetic fields. The driving magnetic field “rotates” as strategicallyplaced coils are switched on and off. This pushes and pulls atpermanent magnets arranged around the edge of a rotor that drivesthe output shaft.Arduino- Digital Output–Rotation–Stepper Motor92
  • 93.
  • 94.
    When the on-offpattern of the magnetic fields is in theproper sequence, the stepper turns (when it’s not, thestepper sits and quivers).The most common stepper is the four-coil unipolar variety.These are called unipolar because they require only thattheir coils be driven on and off. Bipolar steppers require thatthe polarity of power to the coils be reversed.The normal stepping sequence for four-coil unipolarsteppers appears in the figure. If you run the steppingsequence in the figure forward, the stepper rotatesclockwise; run it backward, and the stepper rotatescounterclockwise.The motor’s speed depends on how fast the controller runsthrough the step sequence. At any time the controller canstop in mid sequence.If it leaves power to any pair of energized coils on, themotor is locked in place by their magnetic fields. This pointsout another stepper motor benefit: built-in brakes.Stepper Motor94
  • 95.
  • 96.
    void setup(){pinMode(2,OUTPUT);pinMode(3,OUTPUT);pinMode(4,OUTPUT);pinMode(5,OUTPUT);}void loop(){//Pause between the types that determines the speedint stepperSpeed=200;// Change to change speedint dir=1;// change to -1 to change directionif (dir==1){ //Running ClockwisedigitalWrite(2,HIGH);//Step 1digitalWrite(3,LOW);digitalWrite(4,HIGH);digitalWrite(5,LOW);delay(stepperSpeed);// Pause between the types that determines the speeddigitalWrite(2,HIGH);//Step 2digitalWrite(3,LOW);digitalWrite(4,LOW);digitalWrite(5,HIGH);delay(stepperSpeed);// Pause between the types that determines the speeddigitalWrite(2,LOW);//Step 3digitalWrite(3,HIGH);digitalWrite(4,LOW);digitalWrite(5,HIGH);delay(stepperSpeed);// Pause between the types that determines the speeddigitalWrite(2,LOW);//Step 4digitalWrite(3,HIGH);digitalWrite(4,HIGH);digitalWrite(5,LOW);delay(stepperSpeed);// Pause between the types that determines the speed}if (dir==-1){ //Running CounterClockwisedigitalWrite(2,LOW);//Step 4digitalWrite(3,HIGH);digitalWrite(4,HIGH);digitalWrite(5,LOW);delay(stepperSpeed);// Pause between the types that determines the speeddigitalWrite(2,LOW);//Step 3digitalWrite(3,HIGH);digitalWrite(4,LOW);digitalWrite(5,HIGH);delay(stepperSpeed);// Pause between the types that determines the speeddigitalWrite(2,HIGH);//Step 2digitalWrite(3,LOW);digitalWrite(4,LOW);digitalWrite(5,HIGH);delay(stepperSpeed);// Pause between the types that determines the speeddigitalWrite(2,HIGH);//Step1digitalWrite(3,LOW);digitalWrite(4,HIGH);digitalWrite(5,LOW);delay(stepperSpeed);// Pause between the types that determines the speed}}Stepper Motor-Direction and Speed96
  • 97.
    Vibration Motor: Avibration motor! This itty-bitty, shaftless vibratory motor is perfect for non-audible indicators. Use in any number of applications to indicate to the wearer whena status has changed. All moving parts are protected within the housing. With a 2-3.6V operating range, these units shake crazily at 3V. Once anchored to aPCB or within a pocket, the unit vibrates softly but noticeably. This high quality unit comes with a 3M adhesive backing and reinforced connection wires.http://www.sparkfun.com/products/8449
  • 98.
    MigaOne Linear Actuatorand Muscle WiresMigaOne is a unique electric actuator based on Shape Memory Alloy (SMA) wire, also known as muscle wire. Exposing the MigaOne to 10V and 2.7A for half asecond will cause the wires to heat up, contract, and push what ever is attached to the arm with 2.5 lbs. (11N) of force. Surprisingly strong for such a slimactuator. This is a very new type of actuator with many interesting potential applications. Checkout the datasheet for more ideas and information.http://www.sparkfun.com/products/8751http://www.musclewires.com/Products.php
  • 99.
    Firgelli Linear ActuatorTheycome in various shapes and sizes and powers. They are able to initiate straight locomotion.http://www.robotshop.com/
  • 100.
    Flexible HeaterThey comein various shapes and sizes and powers. They are able to regulate temperature.http://www.omega.com/
  • 101.
    Solenoid Water ValvesAllowto control flow of fluids electronically.iklimnet.comHoneywell.comjelpc-pneumatic.com
  • 102.
    Hagen-Laguna Ultrasonic FogGeneratorGenerates mistMarineDepot.com
  • 103.
    Single/Double/Tri Color LEDMatrix7 segment LED Digital DisplayLED StripsRGB LEDsSparkfun.comhttp://www.jameco.com/www.ledsupply.com/http://www.oznium.com/led-strip-flat-head
  • 104.
    Arduino-Digital Output –Controling any ElectricalDevice with any power needs using a relay// Connect to Pin 13 and Groundvoid setup(){pinMode(13, OUTPUT); // Specify Arduino Pin number andoutput/input mode}void loop(){digitalWrite(13, HIGH); // Turn on Pin 13 sending a HIGH Signaldelay(1000); // Wait for one seconddigitalWrite(13, LOW); // Turn off Pin 13 sending a LOW Signaldelay(3000); // Wait for Three second}104Externally Powered DeviceExternally Powered DeviceExternalPower3v-220vControl PinGRD

Editor's Notes

  • #36 Take an LED and place it on the board so that its long leg is in pin 13 and its short leg is in ground
  • #38 After you are done with typing in the code. Click on Verify button so that the computer compiles the code

[8]ページ先頭

©2009-2025 Movatter.jp