Quickstart - McGraw-Hill Professional - Online book store

13
Quickstart CHAPTER 1 THIS IS A CHAPTER for the impatient Evil Genius. Your new Arduino board has arrived and you are eager to have it do something. So, without further ado... Powering Up When you buy an Arduino Diecimila or Duemilanove board, it is usually preinstalled with a sample Blink program that will make the little built-in LED flash. Figure 1-1 shows an Arduino- compatible board with the LED lit. The light-emitting diode (LED) marked L is wired up to one of the digital input-output sockets on the board. It is connected to digital pin 13. This really limits pin 13 to being used as an output, but the LED only uses a small amount of current, so you can still connect other things to that connector. All you need to do to get your Arduino up and running is supply it with some power. The easiest way to do this is to plug in it into the Universal Serial Bus (USB) port on your computer. You will need a type A-to-type B USB lead. This is the same type of lead that is normally used to connect a computer to a printer. If you are using the older Arduino Diecimila board, make sure that the power jumper is in the USB position (see Figure 1-1). The jumper should connect together the two top pins to allow the board to be powered from the USB. The newer Arduino Duemilanove boards do not have this jumper and select the power source automatically. If everything is working okay, the LED should blink once every two seconds. The reason that new Arduino boards have this Blink sketch already installed is to verify that the board works. If your board does not start to blink when connected, check the position of the power jumper (if it has one) and try a different USB socket, possibly on a different computer, as some USB sockets are capable of supplying more power than others. Also, clicking the Reset button should cause the LED to flicker momentarily. If this is the case, but the LED does not flash, then it may just be that the board has not been programmed with the Flash sketch; but do not despair, as once everything is installed, we are going to modify and install that script anyway as our first project. Installing the Software Now we have our Arduino working, let’s get the software installed so that we can alter the Blink program and send it down to the board. The exact procedure depends on what operating system you use on your computer. But the basic principle is the same for all. Install the USB driver that allows the computer to talk to the Arduino’s USB port. It uses this for programming and sending messages. 1

Transcript of Quickstart - McGraw-Hill Professional - Online book store

Page 1: Quickstart - McGraw-Hill Professional - Online book store
Page 2: Quickstart - McGraw-Hill Professional - Online book store
Page 3: Quickstart - McGraw-Hill Professional - Online book store
Page 4: Quickstart - McGraw-Hill Professional - Online book store
Page 5: Quickstart - McGraw-Hill Professional - Online book store
Page 6: Quickstart - McGraw-Hill Professional - Online book store
Page 7: Quickstart - McGraw-Hill Professional - Online book store
Page 8: Quickstart - McGraw-Hill Professional - Online book store
Page 9: Quickstart - McGraw-Hill Professional - Online book store
Page 10: Quickstart - McGraw-Hill Professional - Online book store
Page 11: Quickstart - McGraw-Hill Professional - Online book store
Page 12: Quickstart - McGraw-Hill Professional - Online book store
Page 13: Quickstart - McGraw-Hill Professional - Online book store