This shows you the differences between two versions of the page.
tutorials:learn:arduino:lesson0.html [2010/10/20 17:59] daigo |
tutorials:learn:arduino:lesson0.html [2016/01/28 18:05] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== Introduction ==== | ||
- | |||
- | |||
- | This lesson won't teach any electronics, really. Its more for making sure that everything is setup and //ready// for the future lessons. It will verify the Arduino is working as intended and that the computer you are using is compatible. | ||
- | |||
- | |||
- | ==== Do you have everything you need? ==== | ||
- | |||
- | |||
- | For this lesson you will need some stuff! Make sure you have this stuff or you will be unable to complete this lesson | ||
- | |||
- | <class table> | ||
- | ^Image^Description^Distributor^ | ||
- | |[[http://www.ladyada.net/images/parts/attiny2313dip.jpg|{{ http://www.ladyada.net/images/arduino/diecimilla.jpg?nolink&350x263 |}}]]|Assembled Arduino board, preferrably a Diecimila or Duemilanove (or whatever the latest version is) but NG is OK too | \\ [[http://www.adafruit.com/index.php?main_page=product_info&cPath=17&products_id=50|Adafruit]] \\ $35 \\ | | ||
- | |[[http://www.ladyada.net/images/parts/10MHzcermosc.jpg|{{ http://www.ladyada.net/images/arduino/usbcable.jpg?nolink&350x263 |}}]]|USB Cable. Standard A-B cable is required. Any length is OK. | \\ [[http://www.adafruit.com/index.php?main_page=product_info&products_id=62|Adafruit]] \\ Or any computer supply store \\ $5| | ||
- | |{{ http://www.ladyada.net/images/arduino/9vplug.jpg?nolink&350x263 |}}| \\ 9V DC power plug with 2.1mm barrel plug, positive tip \\ **Optional** \\ |[[http://www.adafruit.com/index.php?main_page=product_info&products_id=63|Adafruit]] \\ Any electronics supply store (Best Buy, Radio Shack, etc.) \\ $10 \\ | | ||
- | |{{ http://www.ladyada.net/images/arduino/decimillabumper_MED.jpg?nolink&350x237 |}}| \\ 4 Rubber bumpers \\ **Optional** \\ | \\ These are included in Arduinos purchased from the Adafruit shop, otherwise any hardware store should have them. \\ $1 \\ | | ||
- | </class> | ||
- | |||
- | | ||
- | |||
- | |||
- | ==== Preparing the Arduino! ==== | ||
- | |||
- | |||
- | Take your Arduino out of its protective bag. Look at it and make sure it looks kinda like this: | ||
- | |||
- | {{ http://www.ladyada.net/images/arduino/diecimila2.jpg?nolink&500x379 |}} \\ Diecimila Arduino | ||
- | |||
- | Or like this: | ||
- | |||
- | [[http://www.ladyada.net/images/arduino/arduinong.jpg|{{ http://www.ladyada.net/images/arduino/arduinong_t.jpg?nolink&500x375 |}}]] \\ NG Arduino | ||
- | |||
- | If there's anything missing or really wrong, make sure to contact the store you bought it from. [[http://www.flickr.com/photos/wikityler/1333881941/|For example, here is an Arduino that is missing the two round silver capacitors! ]] | ||
- | |||
- | {{ http://www.ladyada.net/images/arduino/missingcaps.jpg?nolink&326x246 |}} | ||
- | |||
- | OK, now that you are satisfied that your Arduino looks good, put the rubber bumpers on the bottom of the board. This will protect your Arduino from spills and dirty tables. If your table is made out of metal, this is essential! | ||
- | |||
- | [[http://www.ladyada.net/images/arduino/bumperplace.jpg|{{ http://www.ladyada.net/images/arduino/bumperplace_t.jpg?nolink&500x367 |}}]] | ||
- | |||
- | |||
- | ==== Download Driver ==== | ||
- | |||
- | |||
- | You'll want to grab the USB drivers **before** plugging in the Arduino for the first time. | ||
- | |||
- | |||
- | |||
- | First, download the USB VCP driver from the [[http://www.ftdichip.com/Drivers/VCP.htm|FTDI website]] | ||
- | |||
- | |||
- | |||
- | I strongly suggest visiting the site and downloading the most recent drivers, as of Sept. 2007 the following links are the most recent. | ||
- | |||
- | |||
- | *[[http://www.ftdichip.com/Drivers/CDM/CDM%202.02.04%20WHQL%20Certified.zip|Windows]] XP/2000/Vista | ||
- | *[[http://www.ftdichip.com/Drivers/VCP/MacOSX/FTDIUSBSerialDriver_v2_1_7.dmg|Mac OS X ]]PPC | ||
- | *[[http://www.ftdichip.com/Drivers/VCP/MacOSX/UniBin/FTDIUSBSerialDriver_v2_2_7.dmg|Mac OS X]] Intel, v **10.4 or higher** | ||
- | *[[http://www.ftdichip.com/Drivers/VCP/Linux/ftdi_sio.tar.gz|Linux]] v2.4 or lower kernel only! | ||
- | |||
- | If you have a Linux computer, and you have a 2.6 kernel, the driver is built-in and you are good to go. You can always run **uname -a** to get the kernel version. | ||
- | |||
- | |||
- | |||
- | Then extract the driver bundle onto the Desktop. | ||
- | |||
- | |||
- | |||
- | Under Windows use Unzip or rightclick and select "Extract All..." | ||
- | |||
- | {{ http://www.ladyada.net/images/arduino/extractdriver.jpg?nolink&441x384 |}} | ||
- | |||
- | |||
- | ==== Power up! (USB) ==== | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | Now we are ready for the moment of truth, it's time to plug your Arduino in and power it up. The most common way to do this is to plug one end of the USB cable into the Arduino and the other end into a computer. The computer will then power the Arduino. | ||
- | |||
- | **The jumper-setting step is only for Diecimila and OLDER arduinos!** Make sure the **Power Jumper** is set correctly. Right next to the USB jack, there is a jumper with 3 pins. If the jumper is on the two pins nearest USB jack, that means you are planning to power the Arduino via the USB cable. If it's on the two pins nearer the DC Jack then it means you are planning to power the Arduino using a 9V battery or wall adapter. | ||
- | |||
- | [[http://www.ladyada.net/images/arduino/usbjumper.jpg|{{ http://www.ladyada.net/images/arduino/usbjumper_t.jpg?nolink&500x311 |}}]] | ||
- | |||
- | You'll want it set as shown in the picture above. | ||
- | |||
- | |||
- | |||
- | Make sure your cable is a A-B cable. One end should be thin, rectangular. The other end should be square. | ||
- | |||
- | [[http://www.ladyada.net/images/arduino/usbcableends.jpg|{{ http://www.ladyada.net/images/arduino/usbcableends_t.jpg?nolink&500x369 |}}]] | ||
- | |||
- | |||
- | |||
- | Plug the thin end into your computer | ||
- | |||
- | {{ http://www.ladyada.net/images/arduino/usbport.jpg?nolink&350x295 |}} | ||
- | |||
- | Make sure that the USB cable is plugged in directly to a computer port. Sometimes monitors or keyboards have a USB port you can plug into. Most of the time this is fine, but I strongly suggest you plug it directly into the computer as that will eliminate any possible problems. Same goes for USB hubs. \\ Later on, once you've verified you can power the Arduino and upload sketches no problem, then you can try plugging it into other ports. | ||
- | |||
- | Plug the square end into your Arduino | ||
- | |||
- | [[http://www.ladyada.net/images/arduino/usbplugged.jpg|{{ http://www.ladyada.net/images/arduino/usbplugged_t.jpg?nolink&500x418 |}}]] | ||
- | |||
- | You should get a small green light on the right side of the Arduino, as shown here. | ||
- | |||
- | [[http://www.ladyada.net/images/arduino/usbpoweredlights.jpg|{{ http://www.ladyada.net/images/arduino/usbpoweredlights_t.jpg?nolink&500x343 |}}]] | ||
- | |||
- | And a few blinking orange lights, on the left side, as shown in this video ([[http://blip.tv/file/get/Ladyada-ArduinoTutorialPlugInUSB253.MP4|download mp4 here]]) | ||
- | |||
- | |||
- | <img title="Click to play" alt="Video thumbnail. Click to play." src="http://blip.tv/file/get/Ladyada-ArduinoTutorialPlugInUSB253.MP4.jpg" border="0" title="Click To Play" /> \\ Click To Play play_blip_movie_385086(); | ||
- | |||
- | If you're plugging it into a Mac or Linux machine, you may not get as much blinking from the orange lights. The video is from plugging into a Windows computer. | ||
- | |||
- | If no lights or blinking occurs, double check: | ||
- | |||
- | |||
- | *Is the USB cable plugged into the computer and into the Arduino? | ||
- | *Is the computer on? | ||
- | *Is the jumper set correctly? | ||
- | *Try another USB port, USB cable, and computer | ||
- | |||
- | If you still can't get it working, your Arduino may be faulty. | ||
- | |||
- | |||
- | |||
- | Next its time to install the driver! Follow these links for instructions for each of the supported operating systems | ||
- | |||
- | |||
- | *[[lesson0-win.html|Windows ]] | ||
- | *[[lesson0-mac.html|Mac]] | ||
- | *[[lesson0-lin.html|Linux]] | ||
- | ==== Power up! (9V DC, optional!) ==== | ||
- | |||
- | |||
- | Another way to power up the Arduino is to plug in a battery or wall adapter into the DC jack. | ||
- | |||
- | |||
- | |||
- | Verify that you have a 9V DC 100-500mA power adapter, with a 2.1mm barrel plug and positive tip. If the box doesn't have any information about the adapter, you can look for these clues | ||
- | |||
- | {{ http://www.ladyada.net/images/metertutorial/wartdetail.jpg?nolink&286x340 |}} | ||
- | |||
- | Make sure the symbol near the bottom of the label is present. It means that the outside of the plug is negative and the inside is positive. A center-negative plug will not work with the Arduino. | ||
- | |||
- | To verify the DC plug is the right shape, just try plugging it in. If it doesn't fit or is wobbly, it's the wrong kind. | ||
- | |||
- | [[http://www.ladyada.net/learn/multimeter/voltage.html|You can learn how to test wall adapters using a multimeter here. ]] | ||
- | |||
- | **The jumper-setting step is only for Diecimila and OLDER arduinos!** Make sure the **Power Jumper** is set correctly. The jumper should be set so that it connects the two pins close to the DC jack | ||
- | |||
- | [[http://www.ladyada.net/images/arduino/dcjumper.jpg|{{ http://www.ladyada.net/images/arduino/dcjumper_t.jpg?nolink&500x312 |}}]] | ||
- | |||
- | Plug in the adapter and verify you get the green light! | ||
- | |||
- | If not, double check: | ||
- | |||
- | |||
- | *Is the DC adapter plugged in? | ||
- | *Is the DC adapter the right kind? Check voltage, polarity, plug size, etc. | ||
- | *Is the jumper set correctly? | ||
- | *Try another adapter. | ||
- | |||
- | If you still can't get it working, your Arduino may be faulty. | ||