The LEGO Arduino Cookbook: Expanding the Realm of MINDSTORMS EV3 Invention
By Grady Koch
()
About this ebook
Add amazing capabilities to your LEGOs by building things such as a metal detector, long-range lidar, audio spectrum analyzer, weather station, and a smartphone. Step-by-step instructions bring these new devices to life. You’ll work with the reliable and inexpensive Arduino UNO to take your projects even further and make them truly smart. Learn to set up and program your Arduino UNO. Then learn data communications protocols (I2C, SPI, and PWM) to link sensors to the Arduino. A variety of data communications techniques are also demonstrated on passing data between the Arduino and the MINDSTORMS EV3 Intelligent Brick.
Equipped with these new tools, LEGO inventors can build vast new capabilities into their designs.
What You'll Learn
- Interface new sensors, devices, and communications with LEGO Mindstorms EV3
- Work with communication protocols of pulse width modulation (PWM), I2c, and SPI
- Convert pulse width modulation to analog voltage with resistor and capacitor components
Who This Book Is For
Tech savvy fans of LEGO projects and hardware hackers. Also coaches or students involved in a school science/technology project or design competition.
Related to The LEGO Arduino Cookbook
Related ebooks
Arduino and LEGO Projects Rating: 0 out of 5 stars0 ratingsProgramming Lego Mindstorms NXT Rating: 3 out of 5 stars3/5Learning LEGO MINDSTORMS EV3 Rating: 5 out of 5 stars5/5IoT Development for ESP32 and ESP8266 with JavaScript: A Practical Guide to XS and the Moddable SDK Rating: 0 out of 5 stars0 ratingsProgramming Microcontrollers with Python: Experience the Power of Embedded Python Rating: 0 out of 5 stars0 ratingsArduino for Kids Rating: 0 out of 5 stars0 ratingsFearless Experiments With Microcomputers Rating: 0 out of 5 stars0 ratingsSmart Home Automation with Linux and Raspberry Pi Rating: 3 out of 5 stars3/5Intel Galileo Essentials Rating: 0 out of 5 stars0 ratingsIntel Galileo Blueprints Rating: 0 out of 5 stars0 ratingsProgramming LEGO® EV3 My Blocks: Teaching Concepts and Preparing for FLL® Competition Rating: 0 out of 5 stars0 ratingsExploring LEGO Mindstorms EV3: Tools and Techniques for Building and Programming Robots Rating: 5 out of 5 stars5/5Building with Virtual LEGO: Getting Started with LEGO Digital Designer, LDraw, and Mecabricks Rating: 0 out of 5 stars0 ratingsMission Python Rating: 0 out of 5 stars0 ratingsBuilding Minecraft Server Modifications - Second Edition Rating: 4 out of 5 stars4/5Programming the BBC Micro Rating: 0 out of 5 stars0 ratingsGetting Started with LEGO Robotics: A Guide for K-12 Educators Rating: 0 out of 5 stars0 ratingsBeginning LEGO MINDSTORMS EV3 Rating: 0 out of 5 stars0 ratingsRaspberry Pi Gaming - Second Edition Rating: 0 out of 5 stars0 ratingsBuilding Your Own Robots: Design and Build Your First Robot! Rating: 0 out of 5 stars0 ratingsRaspberry Pi Retro Gaming: Build Consoles and Arcade Cabinets to Play Your Favorite Classic Games Rating: 0 out of 5 stars0 ratingsRaspberry Pi: Raspberry Pi programming for beginners, including Raspberry Pi projects, tips, tricks, and more! Rating: 0 out of 5 stars0 ratingsMinecraft Story Mode the Complete Adventure Game Xbox One, Wii U, PS3, Download, Unofficial Guide Rating: 0 out of 5 stars0 ratingsGame Console Hacking: Xbox, PlayStation, Nintendo, Game Boy, Atari and Sega Rating: 0 out of 5 stars0 ratingsGameSalad Essentials Rating: 0 out of 5 stars0 ratingsSPIKE™ Prime 02.Hand Drill Building Instruction Guide Rating: 0 out of 5 stars0 ratingsBuilding Robots with LEGO Mindstorms NXT Rating: 3 out of 5 stars3/5Python Robotics for Kids: A Guide to Spike Prime Robot with Object-Oriented Programming: Robotics, #1 Rating: 0 out of 5 stars0 ratingsLearning Stencyl 3.x Game Development: Beginner's Guide Rating: 0 out of 5 stars0 ratingsRaspberry Pi: The complete guide to Raspberry Pi for beginners, including projects, tips, tricks, and programming Rating: 0 out of 5 stars0 ratings
Hardware For You
Windows 11 For Seniors For Dummies Rating: 0 out of 5 stars0 ratingsiPhone Photography: A Ridiculously Simple Guide To Taking Photos With Your iPhone Rating: 0 out of 5 stars0 ratings50 Android Hacks Rating: 5 out of 5 stars5/5Mastering ChatGPT Rating: 0 out of 5 stars0 ratingsComputer Science: A Concise Introduction Rating: 4 out of 5 stars4/5CompTIA A+ Complete Review Guide: Core 1 Exam 220-1101 and Core 2 Exam 220-1102 Rating: 5 out of 5 stars5/5Raspberry Pi Electronics Projects for the Evil Genius Rating: 3 out of 5 stars3/5Exploring Apple iPad: iPadOS 15 Edition: The Illustrated, Practical Guide to Using your iPad Rating: 0 out of 5 stars0 ratingsCompTIA A+ Complete Review Guide: Exam Core 1 220-1001 and Exam Core 2 220-1002 Rating: 5 out of 5 stars5/5Fitbit For Dummies Rating: 0 out of 5 stars0 ratingsSamsung Galaxy S23 Ultra User Guide for Beginners and Seniors Rating: 3 out of 5 stars3/5iPhone For Seniors For Dummies: Updated for iPhone 12 models and iOS 14 Rating: 4 out of 5 stars4/5iPhone 14 Pro Max User Guide for Beginners and Seniors Rating: 0 out of 5 stars0 ratingsDancing with Qubits: How quantum computing works and how it can change the world Rating: 5 out of 5 stars5/5Macs All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsiPhone 12, iPhone Pro, and iPhone Pro Max For Senirs: A Ridiculously Simple Guide to the Next Generation of iPhone and iOS 14 Rating: 0 out of 5 stars0 ratingsiPod and iTunes For Dummies Rating: 4 out of 5 stars4/5Embedded Systems: World Class Designs Rating: 5 out of 5 stars5/5Creative Selection: Inside Apple's Design Process During the Golden Age of Steve Jobs Rating: 5 out of 5 stars5/5Upgrading and Fixing Computers Do-it-Yourself For Dummies Rating: 4 out of 5 stars4/5Linux All-in-One For Dummies Rating: 3 out of 5 stars3/5Build Your Own PC Do-It-Yourself For Dummies Rating: 4 out of 5 stars4/5So you want to build a computer... Rating: 5 out of 5 stars5/5INSTANT PLC Programming with RSLogix 5000 Rating: 4 out of 5 stars4/5Computer Organization and Design: The Hardware / Software Interface Rating: 4 out of 5 stars4/5iPhone X Hacks, Tips and Tricks: Discover 101 Awesome Tips and Tricks for iPhone XS, XS Max and iPhone X Rating: 3 out of 5 stars3/5Programming Arduino: Getting Started with Sketches Rating: 4 out of 5 stars4/5Computers For Seniors For Dummies Rating: 0 out of 5 stars0 ratingsRaspberry Pi Cookbook for Python Programmers Rating: 0 out of 5 stars0 ratings
Reviews for The LEGO Arduino Cookbook
0 ratings0 reviews
Book preview
The LEGO Arduino Cookbook - Grady Koch
© Grady Koch 2020
G. KochThe LEGO Arduino Cookbookhttps://doi.org/10.1007/978-1-4842-6303-7_1
1. The LEGO Arduino Workstation
Grady Koch¹
(1)
Yorktown, VA, USA
A wide new range of LEGO inventions can be realized by combining MINDSTORMS with an Arduino. Arduino is a single-board host controller for many types of sensors, motors, displays, actuators, and interfaces. It has become the most common host controller for electronics developers due to its low cost and ease of use. The Arduino is meant for nonexpert electronics builders to be able to build their own inventions. In this chapter, the hardware for connecting MINDSTORMS EV3 with an Arduino will be developed. This LEGO Arduino Workstation serves as a platform for building the projects found in this book.
The Arduino
The Arduino controller comes in many versions that can be confusing to distinguish from one another. This book uses the basic workhorse version known as the Arduino Uno, shown in Figure 1-1. The LEGO Arduino has many connection points for power and signal input and output that will be used throughout this book. Most of the connection points are by the rows of pins, called headers, on top of the device. Labels on the circuit board and on the side of the headers indicate, in abbreviated form, what these pins do. Other connections on the circuit board are for power input and a micro-USB connector for programming the Arduino Uno. These connections will be discussed in the following chapters.
../images/502674_1_En_1_Chapter/502674_1_En_1_Fig1_HTML.jpgFigure 1-1
The Arduino Uno is a programmable board for hosting sensors and controllers
In this chapter, the mechanical mounting and interface of the Arduino Uno to LEGO are built. Standing alone, as in Figure 1-1, the Arduino Uno is inconvenient to connect to LEGO. So a mechanical mounting plate can be purchased from the 3D printing marketplace that fits in the four mounting holes of the Arduino Uno. Such a plate is shown in Figure 1-2, purchased from www.shapeways.com.
../images/502674_1_En_1_Chapter/502674_1_En_1_Fig2_HTML.jpgFigure 1-2
Connecting the Arduino Uno to LEGO involves a baseplate for a mechanical interface (at the left) and an electrical interface (at the right)
In addition to a baseplate for the mechanical interface of the Arduino to LEGO, an electrical interface is needed to connect power and signals between the Arduino and the EV3 Intelligent Brick. This electrical interface is conveniently implemented with a breadboard, a device used for building prototype electronic circuits. Wires and the leads of electronic components slide into the holes of the breadboard to connect circuits. An Arduino-connected breadboard is available in the form of the Proto Shield, such as the one pictured in Figure 1-2. The Proto Shield has pins on the bottom that match the headers on the Arduino, and the connection between the two is made by pressing the Proto Shield into the Arduino’s headers. The assembled three components of baseplate/Arduino/Proto Shield are shown in Figure 1-3. Also shown in Figure 1-3 is an alternative Arduino implementation, known as a STEMTera. The STEMTera is a combined breadboard and Arduino Uno—the Arduino is encased in the base of the breadboard. In addition, the STEMTera has a LEGO-compatible mechanical mounting on the bottom of the device, so it can simply be pressed together with LEGO parts. Throughout this book, the STEMTera version is used for two reasons: (1) the STEMTera costs less than the baseplate/Arduino/Proto Shield approach, and (2) the STEMTera is more rugged and more attractive.
../images/502674_1_En_1_Chapter/502674_1_En_1_Fig3_HTML.jpgFigure 1-3
Two possible Arduino implementations are the STEMTera (at the left) and a stack of a 3D printed adapter, Arduino Uno, and Proto Shield
Assembling the LEGO Arduino Workstation
A LEGO platform can be built to hold the EV3 Intelligent Brick, Arduino, and various prototype setups. Such a platform is shown in Figure 1-4, based on 12×24 bricks. Building instructions follow Figure 1-4.
../images/502674_1_En_1_Chapter/502674_1_En_1_Fig4_HTML.jpgFigure 1-4
The LEGO Arduino Workstation includes the EV3 Intelligent Brick, Arduino, and area for attachment of experimental prototypes