Raspberry Pi Hardware Projects 1 - Andrew Robinson - E-Book

Raspberry Pi Hardware Projects 1 E-Book

Andrew Robinson

0,0
4,99 €

oder
-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Learn how to take full advantage of all of Raspberry Pi’s amazing features and functions—and have a blast doing it!

Congratulations on becoming a proud owner of a Raspberry Pi, the credit-card-sized computer! If you’re ready to dive in and start finding out what this amazing little gizmo is really capable of, this ebook is for you.

Taken from the forthcoming Raspberry Pi Projects, Raspberry Pi Hardware Projects 1 contains three cool hardware projects that let you have fun with the Raspberry Pi while developing your Raspberry Pi skills. The authors – PiFace inventor, Andrew Robinson and Raspberry Pi For Dummies co-author, Mike Cook – show you how to build:

  • Reaction timer
  • Twittering toy
  • Disco Lights

The ebook also includes a brief guide to setting up the Raspberry Pi for those very new to its unique ways and a bonus project, the Insult Generator, which will teach you simple Python programming while making you laugh.

With Raspberry Pi Hardware Projects 1 you’ll learn everything you need to know to program the Raspberry Pi and build cool, automated and interactive gadgets in no time.

Sie lesen das E-Book in den Legimi-Apps auf:

Android
iOS
von Legimi
zertifizierten E-Readern

Seitenzahl: 149

Veröffentlichungsjahr: 2013

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Raspberry Pi® Hardware Projects, Volume 1

This edition first published 2013

© 2013 John Wiley & Sons, Ltd.

Registered office

John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester, West Sussex, PO19 8SQ, United Kingdom

For details of our global editorial offices, for customer services and for information about how to apply for permission to reuse the copyright material in this book please see our website at www.wiley.com.

The right of the authors to be identified as the authors of this work has been asserted in accordance with the Copyright, Designs and Patents Act 1988.

All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, except as permitted by the UK Copyright, Designs and Patents Act 1988, without the prior permission of the publisher.

Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books.

Designations used by companies to distinguish their products are often claimed as trademarks. All brand names and product names used in this book are trade names, service marks, trademarks or registered trademarks of their respective owners. The publisher is not associated with any product or vendor mentioned in this book. This publication is designed to provide accurate and authoritative information in regard to the subject matter covered. It is sold on the understanding that the publisher is not engaged in rendering professional services. If professional advice or other expert assistance is required, the services of a competent professional should be sought.

Trademarks: Wiley and the Wiley logo are trademarks or registered trademarks of John Wiley and Sons, Inc. and/ or its affiliates in the United States and/or other countries, and may not be used without written permission. Raspberry Pi is a trademark of the Raspberry Pi Foundation. All other trademarks are the property of their respective owners. John Wiley & Sons, Ltd. is not associated with any product or vendor mentioned in the book.

A catalogue record for this book is available from the British Library.

ISBN 978-1-118-58894-9 (ePub); ISBN 978-1-118-72391-3 (ePDF)

Table of Contents

Introduction

Chapter 1: Test Your Reactions

Welcome to the Embedded World!

Good Practice

Obtaining Components

An Interface Board

PiFace Digital

Setting up PiFace Digital

Installing PiFace Digital Software

Connecting PiFace Digital

Using the Emulator

Interfacing with Python

Turning a Light On

Reading a Switch

The Reaction Timer

Meet PiFace Digital’s Connectors

Connecting a Switch and an LED

Playing with the Reaction Timer

What Will You Interface?

Chapter 2: The Twittering Toy

Hacking the Toy

Building the Chicken

Wiring

Making It Talk

Using Espeak in Python

Testing the Espeak module

Making It Move

Creating Classes

Creating Objects

Testing As You Go

Connecting to Twitter

Building and Installing Python Modules

Talking to Twitter

Putting It All Together

Wrapping Up

More Ideas

Chapter 3: Disco Lights

Defining Your Sequence

Getting the Code to Do More

A Small Detour into Theory

Designing the Sequencer

Implementing the Sequencer

The Lights

Using Longer Strip Lights

Making the Lights Move

Designing the Circuit

Building the Circuit

Running the Circuit

Over to You

Appendix A: Getting Your Raspberry Pi Up and Running

Getting the OS on an SD Card

Connecting a Display

Connecting to a Network

Booting the Operating System

Powering Up!

Common Problems

If You Need More Help

Appendix B: Introductory Software Project: The Insult Generator

Variables

Strings

Lists

Functions

Conditional Behaviour

Making Your Own Functions

Creating Loops

More Raspberry Pi Resources

Some of the people who helped bring this book to market include the following:

Editorial and Production

VP Consumer and Technology Publishing Director

Michelle Leete

Associate Director–Book Content Management

Martin Tribe

Associate Publisher

Chris Webb

Executive Commissioning Editor

Craig Smith

Assistant Editor

Ellie Scott

Project Editors

Dana Lesh, Kathryn Duggan

Copy Editors

Dana Lesh, Kathryn Duggan

Technical Editor

Genevieve Smith-Nunes

Editorial Manager

Jodi Jensen

Senior Project Editor

Sara Shlaer

Editorial Assistant

Leslie Saxman

Marketing

Associate Marketing Director

Louise Breinholt

Marketing Manager

Lorna Mein

Senior Marketing Executive

Kate Parrett

Composition Services

Compositors

Carrie A. Cesavice, Jennifer Goldsmith

Proofreaders

Melissa Cossell, Dwight Ramsey

Introduction

You’ve got a Raspberry Pi – now what? This book has the answer; it’s packed full of fun Raspberry Pi projects to inspire you. From getting your Pi generating comedy insults, testing your reactions and building a talking animatronic toy that tweets to building your own disco light show, prepare to be entertained and amazed by your credit card–sized computer.

One word of warning: After you start you might never stop! Electronics and coding can be addictive; who knows what you might go on to make with the skills you learn from this book.

Appendix A, “Getting Your Raspberry Pi Up and Running”, is a beginner’s guide to your first steps with the Raspberry Pi. If you’ve never coded before, Appendix B, “Introductory Software Project: The Insult Generator”, will get you started programming in Python. Chapter 1, “Test Your Reactions”, will get you wiring up simple ­computer-controlled circuits. Chapter 2, “The Twittering Toy”, will show you how to make your code talk to Twitter and get you hacking household items. Chapter 3, “Disco Lights”, shows you how to control LED strips and make them dance in time to the music. Along the way you will pick up the skills you need to develop your own ideas to make projects work exactly how you want them to.

Building and making is incredibly rewarding and satisfying. We want to get more people of the world to become producers of technology rather than consumers. The projects in this book are starting points – step by step, they’re easy to follow so you can get results quickly. But then the real satisfaction can come, that which comes from making the project your own. At the end of each chapter there are ideas and suggestions to extend the project, together with background information to point you in the right direction. The real addictive fun begins when you see your own ideas become reality.

Welcome to the world of digital making.

Chapter 1

Test Your Reactions

In This Chapter

•Getting started interfacing hardware with the Raspberry Pi

• Working with basic electronic circuits

•An introduction to electronic components, including transistors and resistors

• How to wire up a switch and an LED

Think you’ve gotfast fingers? Find out in this chapter as you take your first steps in hardware interfacing to build a reaction timer. You’ll program the Raspberry Pi to wait a random time before turning on a light and starting a timer. The timer will stop when you press a button.

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!