Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Cover
Title
Copyright
Dedication
Contents at a Glance
Contents
About the Authors
About the Technical Reviewer
Acknowledgments
Introduction
Chapter 1: Meeting the NXT-G Software
Flavors of NXT-G
The User Interface
Connecting the NXT
USB
Bluetooth
Firmware
Summary
Chapter 2: Software Design Process
Choosing the Right Problem
Define the Problem
Write Pseudo code
Identify Possible Solutions
Create the Code
Test the Solution
Summary
Chapter 3: Working with My Blocks
Why use My Blocks?
Starting Off Simple
Editing My Block contents
Using a My Block
My Block Properties
Single Property
Multiple Properties
Sharing Values
Managing and Sharing My Blocks
Broken Blocks
Pack and Go
Summary
Chapter 4: When Things Go Wrong
Walking the Code
Viewing Values
The NXT View menu
My Block Viewers
Alert My Block
Breaking the code down
Common Mistakes
Rotation Completion
Port Settings
Duration Value
Environment
Summary
Chapter 5: Moving Data
Data Wires
Variables
How It Works
Managing the Variables
Using the Variable Block
Scope
Constants
Defining a Constant
Custom Constant
Summary
Chapter 6: Making Smart Decisions
Switch Block
Basics
Advanced Switching
Variables
Nesting
Logic Block
Compare Block
Range Block
Summary
Chapter 7: Motors and Motion
Wheel Circumference
Programming to Go Straight
Move Block
Motor Block
Reset Motor Block
MyMove Blocks
Turning the Robot
Move Block
Motor Blocks
Calculating Turns
Creating a Custom MyPivot Block
Creating a Custom MyTurn Block
Stall Detection
Summary
Chapter 8: Light Detection
NXT Light sensor
How It Works
Ambient Light
Reflective Light
Calibration
NXT-G Calibration Block
Local File
Viewing Calibration
Deleting Calibration
Line Following
Simple Condition
Complex Condition
Proportional
Dual Light Sensors
Line Detection
Finding the Line
Reading Colored Lines
Aligning with Lines and Edges
Summary
Chapter 9: Touching and Bumping
The Touch Sensor
Using the Touch Sensor
When Is Pressed Not Pressed?
Determining When to Turn
Squaring Up
Remote NXT Orange Button
Limit Switch
Touch Sensor As an Indicator of an Object
Summary
Chapter 10: Seeing with Ultrasonics
How It Works
Making It Work on the Game Field
Finding Nearby Objects
Summary
Chapter 11: Programming Like a Pro
Data Arrays
State Machines
Master Programs
My Blocks
Simple Sequencer Program
Better Sequencer
Advanced Sequencer
Summary
Chapter 12: Code Management
Single-Computer Scenario
Multiple-Computer Scenario
Online Repositories
Flash Drives
File Naming
Pack and Go
Code Comments
Summary
Chapter 13: Programming Pitfalls
Block and Program Defaults
Port Defaults
The Yellow-Orange Error
Bad Data Wires
Use of Stop Block Instead of Stop Motors
Hardware/Software Mismatches
Changing Units of Measure
Forgetting What You Meant
Conclusion
Chapter 14: Tips and Tricks
Understand Your Program Flow
Manage Your Data Flow
Debugging Tips
Know What You Mean
Listen to Your Robot
Apply Design Patterns
Understand What You Wrote
Know How to Navigate Your Program
Hardware Tips That Help the Software
Manage Lighting Conditions Around the Light Sensor
Avoid Pointing Ultrasonic Sensors at Each Other
Organize Your Wires
Consolidate Logic into My Blocks
Keep Your NXT Firmware Updated
Don’t Reinvent the Wheel
Summary
Index
← Prev
Back
Next →
← Prev
Back
Next →