ebook img

Make: Getting Started with littleBits: Prototyping and Inventing with Modular Electronics PDF

192 Pages·2015·250.695 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Make: Getting Started with littleBits: Prototyping and Inventing with Modular Electronics

M Technology & Engineering / Electronics Make: a Make: Getting Started with littleBits k e : littleBits is the award-winning modular electronics platform that has put Getting G the power of electronics in the hands of everyone. Just snap them e t together—no soldering, programming, or wiring needed. No matter your t i n age, gender or technical ability, whether you’re a young maker, an analog g Started with musician, an interaction designer, or a STEM/STEAM teacher, littleBits is S t the easiest way to learn and invent with electronics. a r t e Start from the very simple (lights, sounds, sensors) and invent your way d littleBits to the very complex (wireless RF, programmable, cloud-connected), with w i billions of possible combinations. With littleBits, you can unleash your t h inner inventor. l i t t Written by littleBits creator Ayah Bdeir (TED Senior Fellow, co-founder le B of the Open Hardware Summit, MIT 35 under 35), and MAKE editor i t Matt Richardson, this book is the most extensive guide to the modular s electronics platform that has revolutionized hundreds of thousands of makerspaces, schools, design studios and homes in over 70 countries. With Getting Started with littleBits, you’ll make: B d e » A remote-controlled car with gripper arm i r a » An analog synthesizer to rock out with your own modular instruments n d » Robots that use logic to detect and navigate around walls R i » An electronic valentine that communicates across the world with c h the cloudBit a r d » A custom mouse or game controller with the Arduino at Heart Module s o » Your own Bits modules with the littleBits Hardware Development Kit n Start with these projects and your journey in invention will be unstoppable. Light it, push it, move it, buzz it, blink it, shake it. Your ideas, snapped to life! Learning and Inventing US $19.99 CAN $22.99 ISBN: 978-1-4571-8670-7 with Modular Electronics Make: Ayah Bdeir and makezine.com Matt Richardson M Technology & Engineering / Electronics Make: a Make: Getting Started with littleBits k e : littleBits is the award-winning modular electronics platform that has put Getting G the power of electronics in the hands of everyone. Just snap them e t together—no soldering, programming, or wiring needed. No matter your t i n age, gender or technical ability, whether you’re a young maker, an analog g Started with musician, an interaction designer, or a STEM/STEAM teacher, littleBits is S t the easiest way to learn and invent with electronics. a r t e Start from the very simple (lights, sounds, sensors) and invent your way d littleBits to the very complex (wireless RF, programmable, cloud-connected), with w i billions of possible combinations. With littleBits, you can unleash your t h inner inventor. l i t t Written by littleBits creator Ayah Bdeir (TED Senior Fellow, co-founder le B of the Open Hardware Summit, MIT 35 under 35), and MAKE editor i t Matt Richardson, this book is the most extensive guide to the modular s electronics platform that has revolutionized hundreds of thousands of makerspaces, schools, design studios and homes in over 70 countries. With Getting Started with littleBits, you’ll make: B d e » A remote-controlled car with gripper arm i r a » An analog synthesizer to rock out with your own modular instruments n d » Robots that use logic to detect and navigate around walls R i » An electronic valentine that communicates across the world with c h the cloudBit a r d » A custom mouse or game controller with the Arduino at Heart Module s o » Your own Bits modules with the littleBits Hardware Development Kit n Start with these projects and your journey in invention will be unstoppable. Light it, push it, move it, buzz it, blink it, shake it. Your ideas, snapped to life! Learning and Inventing US $19.99 CAN $22.99 ISBN: 978-1-4571-8670-7 with Modular Electronics Make: Ayah Bdeir and makezine.com Matt Richardson Make: Getting Started with littleBits Ayah Bdeir and Matt Richardson Make: Getting Started with littleBits by Ayah Bdeir and Matt Richardson Copyright © 2015 Ayah Bdeir and Matt Richardson. All rights reserved. Printed in the United States of America. Published by Maker Media, Inc., 1160 Battery Street East, Suite 125, San Francisco, California 94111. Maker Media books may be purchased for educational, business, or sales promo- tional use. Online editions are also available for most titles (http://my.safaribookson- line.com). For more information, contact our distributor’s corporate/institutional sales department: 800-998-9938 or [email protected]. Editor: Brian Jepson Interior Designer: David Futato Cover Designer: Joe Shouldice April 2015: First Edition Revision History for the First Edition 2015-04-07: First Release See http://oreilly.com/catalog/errata.csp?isbn=9781457186707 for release details. The Make logo and Maker Media logo are registered trademarks of Maker Media, Inc. Make: Getting Started with littleBits and related trade dress are trademarks of Maker Media, Inc. littleBits, littleBits logo, Bits, bitSnap, “Make Something That Does Something,” bitLab, cloudBit, and “Snap The Internet To Anything” are trademarks of littleBits Electronics, 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 preparation of this book, the publisher and author assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein. 978-1-4571-8670-7 [LSI] Contents Foreword by the Founder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix 1/littleBits Basics: Inputs and Outputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 The Bits. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Power (Blue). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Output (Green). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Input (Pink). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Wire (Orange). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Other Accessories. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Project: Night Airplane. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Project: Coffee Table Ground Effect Lighting. . . . . . . . . . . . . . . . . . . . . . . . . . . 30 A Quick Overview of littleBits Resources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 2/Control and Logic. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Inverter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Pulse. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Project: Flashing Sign. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Latch. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Timeout. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Project: Midnight Snack Light. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Threshold. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Logic Bits. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Double AND. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Double OR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 NAND. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 NOR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 XOR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Going Further. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 3/Music and Motion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 Synth Kit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 Oscillator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 iii Random. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Keyboard. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Micro Sequencer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Sequencer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 Mix. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Envelope. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 Filter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Delay. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 Project: Synthesizer With the Works. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 MP3 Player. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 New from KORG: MIDI, CV, USB i/o. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 Making Motion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 Vibration Motor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 DC Motor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 Servo. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 Project: RC Car. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 4/Wireless and Cloud Communication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Wireless Transmitter and Receiver. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Project Tutorial: Remote Control Facetime Car. . . . . . . . . . . . . . . . . . . . . . 97 Remote Trigger. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 IR Transmitter and AC Switch. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 cloudBit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 Getting Set Up. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 Cloud Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 IFTTT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 Project: The Game is On!. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 Project: Thinking Of You. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 Going Further with the cloudBit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 5/Programming with the Arduino Bit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 What Is Arduino?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 Getting Set Up. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 Arduino Sketch Basics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 pinMode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 digitalWrite. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 delay. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 Arduino Inputs and Outputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 digitalRead. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 analogWrite. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 analogRead. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 Keyboard and Mouse Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 iv Contents Variable Scope. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 Mouse Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 Project: HelloRun Game Controller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 Keyboard Emulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 while. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 Using the Arduino Bit with Scratch. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 6/Making Your Own Bits. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 Proto Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 Creating an Output. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 Creating an Input. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 Perf Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 Input and Output. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 What Can You Make?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 Contents v Foreword by the Founder You’ve already bought this book, so I’m not going to spend any time trying to convince you of the merits of the Maker Move- ment—my assumption is that you’re sold. I assume you’re sold on the idea that the gratification that one gets from making something—whether in robotics, 3D printing, or food—is very powerful. I assume you’re sold on the promise of social, eco- nomic, and educational change that can come from spreading the ethos of STEM/STEAM and “learning by making.” I assume that you believe that promoting a society where people make, remix and share online or in social settings—as opposed to a silo culture—is a good thing. But I’m writing today to talk about an even bigger idea: the idea that we don’t just need to be makers, we need to be inventors. I believe that inventors are an evolved breed of makers. Inventors are sometimes problem-solvers that are inventing a solution to a particular problem, and other times they are creative thinkers that are inventing a future that has never been imagined. To ele- vate making to inventing, we need to equip ourselves with a new language to understand the world around us, and a platform to reinvent it. We spend more than 11 hours with electronic devices every sin- gle day, but most of us don’t know how they work, or how to make our own. When I first started working on littleBits in 2008, this number was 7.5. Technology has moved from being an inte- gral part of our lives, to helping define who we are. It’s the cars we drive, the phones we own, the alarm systems that keep us safe, the iPads that two year old kids tap and swipe. Yet engi- neering is mysticized, electronic objects are black-boxed, and if we are honest with ourselves, we have ceased to understand the technological world we live in. And in the meantime, the world is moving at a very fast pace, from the Internet of Things to Artifi- vii cial Intelligence, each with their own promises and challenges. How can we solve the challenges we face today if we don’t understand the world we live in? I believe that to solve 21st cen- tury challenges—economic, environmental, medical—we don’t need more, we need smarter. Tomorrow’s sense of pride will come from inventing the future. As Matt and I were writing this book, I reviewed some of the very early images, sketches, and writings from the first days of little- Bits as a project. I am incredibly humbled and surpassingly exci- ted about what lies ahead. I hope you enjoy this book and all the love and care that has gone into it, and into littleBits as a prod- uct and a company. I would like to deeply thank our team of bit- sters who work tirelessly to make this vision come to life. They are some of the most talented and dedicated people I have ever had a chance to collaborate with, and they keep it EPIC. But most of all, I would like to thank the littleBits community, an incredibly diverse community of artists, designers, kids, engi- neers, hackers, educators, librarians, from all ages, all lan- guages, and interests. You never cease to amaze me with all the stunning, shocking, and delightful inventions you come up with every day. Now enough of me talking, go ahead and start inventing! — Ayah Bdeir, Founder and CEO, littleBits viii Foreword by the Founder

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.