Make: Lego and Arduino Projects: Projects for extending MINDSTORMS NXT with open-source electronics
John Baichtal, Matthew Beckler, Adam Wolf
Format: PDF / Kindle (mobi) / ePub
Make amazing robots and gadgets with two of today’s hottest DIY technologies. With this easy-to-follow guide, you’ll learn how to build devices with Lego Mindstorms NXT 2.0, the Arduino prototyping platform, and some add-on components to bridge the two. Mindstorms alone lets you create incredible gadgets. Bring in Arduino for some jaw-dropping functionality—and open a whole new world of possibilities.
Build a drink dispenser, music synthesizer, wireless lamp, and more
Each fun and fascinating project includes step-by-step instructions and clear illustrations to guide you through the process. Learn how to set up an Arduino programming environment, download the sketches and libraries you need, and work with Arduino’s language for non-programmers. It’s a perfect book for students, teachers, hobbyists, makers, hackers, and kids of all ages.
- Build a Drawbot that roams around and traces its path with a marker pen
- Construct an analog Mindstorms clock with hands that display the correct time
- Create a machine that mixes a glass of chocolate milk at the touch of a button
- Make a Gripperbot rolling robotic arm that you control wirelessly with Arduinos mounted on your arms
- Explore electronic music by building a guitar-shaped Lego synthesizer
- Build a Lego lamp with on/off and dimmer switches that you control with a smartphone application
- Jump feet first into the world of electronics, from learning Ohm’s Law to working with basic components
You'll need the Bricktronics shield created for this book by Open Source Hardware kit maker Wayne and Layne, or you can build a breadboarded equivalent (see Chapter 10) for about $25 in parts.
motors are great for providing motion without precision, and are often used in simple toys. Hobby servos are small, geared motors with feedback. They usually have a limited range of motion, but they can be precisely directed to a specific angle. Stepper motors move in precise steps, and can be directed step by step. They are often used in CNC and 3D printing applications. The motors in an NXT are a little different than any of those. They’re DC motors, but they have feedback so an Arduino can get
304 305 Contents v Foreword Remember the initial excitement of experimenting with Lego robotics? It felt like the entire universe was open to you! With so many robots to build to tackle interesting challenges, perform experiments, and make interesting algorithms, the possibilities were endless. From modifying some bricks with LEDs, to gluing assemblies together to make your robot better, robot building with Legos is an exciting experience. One of my personal favorite experiments with Lego
you haven’t snagged it already!) The clock code follows a general form which is seen throughout this book. First, information about the environment is gathered. Second, we determine a reaction. Third, we react until we gather more information about the environment. We do this in the clock with a main loop that only iterates every hundred milliseconds or so, and if the code in the loop executes faster than that, it idles until the next iteration. We’ve found this to be a useful code framework for
want to measure. When your multimeter is set to current measuring mode, the resistance between the two probes is very very small, so that the meter barely affects the current at all. When measuring current, it's important to never measure the current across the terminals of a voltage supply, like a battery or DC adapter. Measuring the current through a circuit using a voltage supply is fine, but connecting the meter across the terminals of a voltage supply is effectively shorting the supply!
sensor. The temperature of the sensor changes its resistance. To use it with an Arduino, it can be hooked up in a voltage divider with a known resistance. Then, as the resistance varies, the voltage on the pin in the middle of the divider changes in a way we can predict. Temperature changes the resistance of a thermistor in a non-linear way, so the easiest way to get a temperature out of the measured value is to use a simple software lookup table, such as the one on the Arduino playground