Arduino: A Quick-Start Guide

Arduino: A Quick-Start Guide

Maik Schmidt

Language: English

Pages: 300

ISBN: 1941222242

Format: PDF / Kindle (mobi) / ePub


Arduino is an open-source platform that makes DIY electronics projects easier than ever. Gone are the days when you had to learn electronics theory and arcane programming languages before you could even get an LED to blink. Now, with this new edition of the bestsellingArduino: A Quick-Start Guide, readers with no electronics experience can create their first gadgets quickly. This book is up-to-date for the new Arduino Zero board, with step-by-step instructions for building a universal remote, a motion-sensing game controller, and many other fun, useful projects.

This Quick-Start Guide is packed with fun, useful devices to create, with step-by-step instructions and photos throughout. You'll learn how to connect your Arduino to the Internet and program both client and server applications. You'll build projects such as your own motion-sensing game controller with a three-axis accelerometer, create a universal remote with an Arduino and a few cheap parts, build your own burglar alarm that emails you whenever someone's moving in your living room, build binary dice, and learn how to solder. In one of several new projects in this edition, you'll create your own video game console that you can connect to your TV set.

This book is completely updated for the new Arduino Zero board and the latest advances in supporting software and tools for the Arduino. Sidebars throughout the book point you to exciting real-world projects using the Arduino, exercises extend your skills, and "What If It Doesn't Work" sections help you troubleshoot common problems.

With this book, beginners can quickly join the worldwide community of hobbyists and professionals who use the Arduino to prototype and develop fun, useful inventions.

What You Need:

This is the full list of all parts you'd need for all projects in the book; some of these are provided as part of various kits that are available on the web, or you can purchase individually. Sources include adafruit.com, makershed.com, radioshack.com, sparkfun.com, and mouser.com. Please note we do not support or endorse any of these vendors, but we list them here as aconvenience for you.

Arduino Zero (or Uno or Duemilanove or Diecimila) board

USB cable

Half-size breadboard

Pack of LEDs (at least 3, 10 or more is a good idea)

Pack of 100 ohm, 10k ohm, and 1k ohm resistors

Four pushbuttons

Breadboard jumper wire / connector wire

Parallax Ping))) sensor

Passive Infrared sensor

An infrared LED

A 5V servo motor

Analog Devices TMP36 temperature sensor

ADXL335 accelerometer breakout board

6 pin 0.1" standard header (might be included with the ADXL335)

Nintendo Nunchuk Controller

Arduino Ethernet shield

Arduino Proto shield and a tiny breadboard (optional but recommended)

Piezo speaker/buzzer (optional)

Tilt sensor (optional)

A 25-30 Watts soldering iron with a tip (preferrably 1/16")

A soldering stand and a sponge

A standard 60/40 solder (rosin-core) spool for electronics work

 

 

 

 

 

 

 

 

 

 

 

temperature and distance. They are both of type float, and we have declared them both private. Now only members of the SensorData class are allowed to access them. This is considered good style, because it prevents unwanted side effects and makes future changes much easier. A class should never expose its innards. To set and get the values of our attributes, we have to use public methods, and our class has three of them: SensorData(), getTemperature(), and getDistance(). (Java and C++ programmers

be connected to three analog pins on the Arduino. We connect Z to analog pin 0, Y to analog pin 1, and X to analog pin 2 (see Figure 6.3, on the following page, and double-check the pin labels on the breakout board you're using!). Now that we've connected the ADXL335 to the Arduino, let's use it. 6.3 Bringing Your Acceierometer to Life A pragmatic strategy to get familiar with a new device is to hook it up and see what data it delivers. The following program reads input values for all three

button we have added, and it performs the anti-jittering we have created in Section 6.4, Finding and Polishing Edge Values, on page 137: Down! oad MotionSensor/Controller/Controller.pde #include const unsigned int BUTTON_PIN = 7; const unsigned int X_AXIS_PIN = 2; const unsigned int Y_AXIS_PIN = 1; const unsigned int Z_AXIS_PIN = 0; const unsigned int NUM_AXES = 3; const unsigned int PINS[NUM_AXES] = { X_AXIS_PIN, Y_AXIS_PIN, Z_AXIS_PIN }; const unsigned int BUFFER_SIZE = 16; const

you water it, it dutifully sends a "Thank You" message. Although the official version of the Botanicall is a specialized piece of hardware, you can build it using an Arduino.f Botanicaiis certainly make your life a bit easier. Whether the Twitwee Clock* improves your life is a matter of taste. This modified cuckoo clock looks for Twitter updates using a wireless Internet connection. Whenever it finds a programmable search term, it displays the corresponding tweets on a display and also pops out a

IP address manually. In most cases, this will be a local address in the 192.168.x.y range; we store this address in the myjp array. • To turn domain names such as time.nist.gov into an IP address, you need access to the Domain Name System (DNS). The Arduino's standard library doesn't support DNS, so we have to find out the IP address ourselves. We assign it to time_server. The telnet command already turned the DAYTIME service domain name into an IP address for us. Alternatively, you can use one

Download sample

Download