Description
Book SynopsisTable of ContentsChapter 1: The Hub
Assembling and Charging the Hub
Controls and Displays
Front Panel Buttons
Displays and Speaker
LEGO Mounting Points
Exercise: The Motor Spinner
Building the Motor Spinner
Activating the Motor
Project: The Distance Spinner
Building the Distance Spinner
Using the Distance Spinner
Summary
Chapter 2: Programming
Using the Robot Inventor App
Installing and Updating the App
The Interface
Connecting the Hub
Updating the Hub Operating System
Exploring the Hub Screen
The Program Design Process
Writing the Algorithm
Drawing the Flowchart
Writing the Code
Coding in Word Blocks
Writing the Program
Writing Comments
Coding in Python
The Completed Program
Importing Code
Creating an Object and Assigning it to a Variable
Displaying Text on the Hub Screen
Beeping the Hub Speaker
Setting the Center Button Light
Waiting Ten Seconds
Ending the Program
Downloading and Running Code
Debugging and Troubleshooting
Project: The Dance Floor
The Word Blocks Code
The Python Code
Defining a Variable
Beginning the Loop and Checking for a Button Press
Setting the Center Button Light Color
Beeping the Hub Speaker
Lighting Up a Pixel
Setting the Tempo with a Delay
Incrementing a Variable
Checking the Value of a Count
Summary
Chapter 3: Building Elements
Liftarms
Straight Liftarms
Bent Liftarms
Rectangular Liftarms
Connecting Liftarms
Pins
Axles and Bushes
Exercise: Building Triangular Structures
Connectors
Exercise: Building Symmetric Objects with Connectors
Project: Mechanical Linkages
The Universal Joint
The Eccentric
Summary
Chapter 4: Gears
Gears in the MINDSTORMS Robot Inventor Set
Spur Gears
Beveled Gears
Speeding Up Rotation, or “Gearing Up”
Slowing Down Rotation, or “Gearing Down”
Exercise: The Many-Geared Machine
Direction of Rotation
Calculating the Gear Ratio for more than two Gears
Exercise: The Torque Demonstrator
Lowering Torque by Gearing Down
Increasing Torque by Attempting to Raise the Speed (and Failing)
Exercise: The Compound-Gear Spinner
Project: Two-Speed Transmission
Summary
Chapter 5: Mechanisms
Exercise: The Ratchet
Exercise: The Cam
Exercise: The Differential
Assembling the Differential
Building the Differential Demonstrator
Exercise: Turntables
Project: The Mechanized Cannon
Summary
Chapter 6: Motors
Speed and Angle
Exercise: The Speed and Angle Demonstrator
Controlling the Motor’s Speed in Word Blocks
Controlling the Motor’s Speed in Python
Setting the Motor’s Angle in Word Blocks
Setting the Motor’s Angle in Python
Exercise: Understanding Torque and Stall
Exercise: Powering a Vehicle with a Tank Drive System
Building the Tank
Programming the Tank
The Word Block Code
The Python Code
Exercise: Using a Motor as a Rotation Sensor
Building the Position Mimic
Programming the Position Mimic
The Word Blocks Code
The Python Code
Project: The Rear-Wheel Drive Car
Building the Rear-Wheel Drive Car
Programming the Rear-Wheel Drive Car
The Word Blocks Code
The Python Code
Summary
Chapter 7: The Motion Sensor
Tilt Angle: Yaw, Pitch, and Roll
Exercise: Programming with Tilt Data
Measuring Tilt Angles in Word Blocks
Measuring Tilt Angles in Python
Orientation
Exercise: Generating Cat Sounds Based on the Hub’s Orientation
The Word Blocks Code
The Python Code
Other Motion Sensor Measurements: Gyro Rate and Acceleration
Project: The Up Pointer
Building the Up Pointer
Programming the Up Pointer
The Word Blocks Code
The Python Code
Summary
Chapter 8: The Distance Sensor
Using the Distance Sensor
Exercise: The Ultrasonic Tape Measure
Programming the Ultrasonic Tape Measure
The Word Blocks Code
The Python Code
Project: The Scanning Cannon
Building the Scanning Cannon
Programming the Scanning Cannon
The Word Blocks Code
The Python Code
Summary
Chapter 9: The Color Sensor
Exercise: The Brightness Beeper
Programming the Brightness Beeper
The Word Blocks Code
The Python Code
Project: The Color Sorter
Building the Color Sorter
The Baseplate
The Chute
The Pusher
The Basket
Final Assembly
Programming the Color Sorter
The Word Blocks Code
The Python Code
Summary
Appendix: Parts lists for Exercises and Projectsapter 1: The Hub.- Chapter 2: Programming.- Chapter 3: Building Elements.- Chapter 4: Gears.- Chapter 5: Mechanisms.- Chapter 6: Motors.- Chapter 7: The Motion Sensor.- Chapter 8: The Distance Sensor.- Chapter 9: The Color Sensor