Make: Raspberry Pi and AVR Projects
by Cefn Hoile , Clare Bowman , Sjoerd Dirk Meijer , Brian Corteil , and Lauren Orsini
Copyright 2015 Backstop Media, LLC. All rights reserved.
Printed in the United States of America.
Published by Maker Media, Inc. , 1005 Gravenstein Highway North, Sebastopol, CA 95472.
Maker Media books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (.
- Editor: Patrick Di Justo
- Production Editor: Melanie Yarbrough
- Copyeditor: Charles Roumeliotis
- Proofreader: Kim Cofer
- Indexer: Angela Howard
- Interior Designer: David Futato
- Cover Designer: Brian Jepson
- Illustrators: Cefn Hoile, Clare Bowman, Sjoerd Dirk Meijer, Brian Corteil, and Rebecca Demarest
- Cover Photographer: Sjoerd Dirk Meijer
- November 2014: First Edition
Revision History for the First Edition
- 2014-11-04: First Release
See http://oreilly.com/catalog/errata.csp?isbn=9781457186240 for release details.
Make:, Maker Shed, and Maker Faire are registered trademarks of Maker Media, Inc. The Maker Media logo is a trademark of Maker Media, Inc. Make: Raspberry Pi and AVR Projects and related trade dress are trademarks of Maker Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and Maker Media, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.
978-1-457-18624-0
[LSI]
Preface
All of the projects in this book use the Raspberry Pi. Read along to discover how to receive Twitter alerts through a lamp, collect temperature data from a fish tank, control a game with Raspberries (the actual fruit!), or even learn how to make your own wearable one man band.
Book-wide bill of materials
Table -1. Book-wide bill of materials
Item | Item |
---|
Raspberry Pi (Models B or B+) | Pi Cobbler |
2x ADXL 345 triple axis accelerometer breakout board (labeled GY-291) | 2x 100 ohm resistor |
2x piezoelectric transducer | 7x 170 point mini breadboards |
2x Bluetooth UART transceiver (board name JY-MCU, running HC-06 firmware) | 2x 1M ohm resistor |
2x USB to UART serial programmer (CP2102) | 3x 40-pin male header strip |
2x ATmega328P-PU (flashed with Arduino Uno bootloader) | 2x 5mm red ultrabright LED |
6x 10k ohm resistors | 4x 22pF ceramic capacitor |
4x 100nF ceramic capacitor | Solid core wire |
2x 4-way female ribbon cables | 2x LiPo battery and charger or 6x AAA battery pack and batteries |
Jumper wires male-male | Jumper wires male-female |
DS18B20 digital temperature sensor | Push-to-make button/switch |
3mm acrylic base plate | 2x 2.5mm hex bolts, length 12mm |
3mm acrylic top plate | 2x 2.5mm nuts |
4x PCB hex spacers 25mm | 16x 3mm hex bolts, length 6mm |
4x PCB hex spacers 10mm | 4x sticky rubber feet |
2x PCB round spacers 6mm | Double-sided sticky foam tape/pads |
Wireless USB adapter | 4.7k (1/4 Watt) resistor |
Darlington array ULN2803A | Spotlight Kit LED RGB matrix |
1x 400-point miniature breadboard | 2mm heat shrink tube |
Sparkfun Breadboard Power Supply 5V/3.3V part number PRT-00114 | 12V DC 2A power supply to 9V DC 2A power supply |
1x 4-pole screw connector block for stripboard, w/ 0.1 pitch hole spacing | Wire 22 AWG |
Stripboard prototyping PCB, w/ 0.1 pitch hole spacing | 2.1 jack socket (breadboard compatible) |
8GB SD card or 8GB SD card with NOOBS preloaded | 2x button |
1x ATmega328P-PU (DIP28) or ATmega8 (DIP28) | 1x 10 uF capacitor |
3x 100 nF/0.1 uF capacitor | 2x 22 pF capacitor |
16x 22 M or 20 M resistor (1/4W) | 2x 10 k resistor (1/4W) |
1x 2.2 k resistor (1/4W) | 2x 68 resistor (1/4W) |
5x 330 resistor (1/4W) | 5x LED (5mm) (4 different colors) |
1x 1N4148 diode | 2x 3.6V Zener diode (max. 0.5W!) |
1x 16 MHz crystal |
Table -2. Optional materials
2x Copper stripboard 93 x 54mm | 2x 28 pin DIP IC Socket Adapter |
2x 40 pin male right angle header strip | ESD Anti Static Wrist Strap |
1x stripboard (94 x 55 mm) | 1x 28 pin DIP IC socket |
Alligator clips | Small breadboard |
1x 150 ohm resistor 1/4 watt through the hole | 3x super bright green LEDs 20mA |
1 x 315 ohm resistor 1/4 watt through the hole | 3x super bright red LEDs 20mA |
1 x 105 ohm resistor 1/4 watt through the hole | 3x super bright blue LEDs 20mA |
Table -3. Tools list
Long-nosed pliers | Wire cutter |
Wire stripper | Hot glue gun and glue sticks |
Solder | Dedicated spot cutter or 4mm drill bit |
Stripboard | Junior hacksaw |
Soldering iron and holder | Permanent pen |
Blue-tack (poster putty) | Ruler |
G-clamp | Multimeter |
Small vise | Saw |
Hand drill | Hammer |
Allen key to suit bolts | Stripboard cutter |
Desoldering braid | Safety glasses |
Solder sucker | Screwdrivers to suit |
Craft knife | Masking tape |
Conventions Used in This Book
The following typographical conventions are used in this book:
ItalicIndicates new terms, URLs, email addresses, filenames, and file extensions.
Constant width
Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords.
Constant width bold
Shows commands or other text that should be typed literally by the user.
Constant width italic
Shows text that should be replaced with user-supplied values or by values determined by context.
Note
This element signifies a tip, suggestion, or general note.