Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
The Art of LEGO® Mindstorms® EV3 Programming
Dedication
about the author
about the technical reviewers
acknowledgments
introduction
who this book is for
prerequisites
what to expect from this book
how best to use this book
1. LEGO and robots: a great combination
LEGO MINDSTORMS EV3
the LEGO MINDSTORMS EV3 set
the LEGO MINDSTORMS EV3 software
software, firmware, and hardware
art and engineering
qualities of a good program
what you’ll learn from this book
the LEGO MINDSTORMS online community
what’s next?
2. the EV3 programming environment
a tour through the MINDSTORMS software
A: the programming canvas
B: the content editor
C: the programming palettes
D: the hardware page
E: the download and run buttons
writing an EV3 program
general layout of a block
your first program
saving your work
running your program
project properties
your second program
comments
adding a comment
tips for working with comments
context help
conclusion
3. TriBot: the test robot
TriBot components
building the motor and wheel assembly
building the caster wheel assembly
assembling the caster wheel with the home edition
assembling the caster wheel with the education edition
adding the EV3 brick
mounting the infrared or ultrasonic sensor
connecting the color sensor
attaching the gyro sensor (education edition)
building a touch sensor bumper
attaching the cables
attaching the touch sensor
attaching the infrared or ultrasonic sensor
attaching the color sensor
attaching the gyro sensor (education edition)
attaching the motors
alternate placement for the color sensor
alternate placement for the ultrasonic or infrared sensor
building a lift arm
conclusion
4. motion
the EV3 motors
the move steering block
mode
steering
power
duration
brake at end
port
port view
the EV3 intelligent brick view menu
the ThereAndBack program
moving forward
turning around
testing a single block
moving back to the start
the AroundTheBlock program
the first side and corner
the other three sides and corners
testing the program
the move tank block
the large motor and medium motor blocks
the lift arm
the invert motor block
a problem with coasting
further exploration
conclusion
5. sensors
using the sensors
the touch sensor
the BumperBot program
moving forward
detecting an obstacle
backing up and turning around
testing
the color sensor
color mode
reflected light intensity mode
ambient light intensity mode
port view
the IsItBlue program
the switch block
improving the program
using the touch sensor
adding a loop
the LineFinder program
using port view to find a threshold value
the infrared sensor and remote
proximity mode
beacon heading and beacon proximity mode
remote mode
the BumperBot- WithButtons program
the ultrasonic sensor
distance inches and distance centimeters modes
presence/listen mode
the DoorChime program
detecting a person
playing a chime
stopping the chime
the gyro sensor
rate mode
angle mode
resetting the angle
the GyroTurn program
the motor rotation sensor
the BumperBot2 program
further exploration
conclusion
6. program flow
the switch block
setting the condition
the LineFollower program
the basic program
selecting the color sensor threshold
configuring the move blocks
testing the program
more than two choices
testing the program
using tabbed view
the RedOrBlue program
identifying red objects
adding a new case
the default case
the loop block
the loop interrupt block
the BumperBot3 program
further exploration
conclusion
7. the WallFollower program: navigating a maze
pseudocode
solving a maze
program requirements
assumptions
initial design
following a straight wall
writing the code
testing
turning a corner
writing the code
testing
going through an opening
writing the code
testing
final test
further exploration
conclusion
8. data wires
what is a data wire?
the GentleStop program
writing the program
tips for using data wires
the SoundMachine program
controlling the volume
using the math block
adding tone control
understanding data types
displaying the frequency and volume values
using the text block
adding labels to the displayed values
displaying the volume
further exploration
conclusion
9. data wires and the switch block
the switch block’s value modes
rewriting the GentleStop program
passing data into a switch block
advantages of using a sensor block
passing data out of a switch block
simplifying the LineFollower program
further exploration
conclusion
10. data wires and the loop block
logic mode
the loop index
the LoopIndexTest program
restarting a loop
the final loop index value
the Spiral- LineFinder program
following a spiral
detecting a line while moving in a spiral
using the gyro sensor for better turns
further exploration
conclusion
11. variables
the variable block
the RedOr-BlueCount program
creating and initializing the variables
displaying the initial values
counting the red objects
counting the blue objects
managing variables using the project properties page
the compare block
the LightPointer program
defining the variables
finding the light source
creating the Lightpointer program
the constant block
further exploration
conclusion
12. my blocks
creating a my block
the my blocks palette
editing a my block
the LogicToText my block
adding, removing, and moving parameters
the parameter setup tab
the DisplayNumber my block
changing my block parameters
variables and my blocks
further exploration
conclusion
13. math and logic
the math block’s advanced mode
supported operators and functions
the modulo operator
math block errors
a proportional LineFollower
EV3 timers
the DisplayTimer program
splitting the timer reading into minutes and seconds
building the text to display
the round block
the random block
adding a random turn to BumperBot
the logic block
adding some logic to BumperBot
the range block
the TagAlong program
the GyroPointer program
further exploration
conclusion
14. the EV3 lights, buttons, and display
the EV3 buttons
the powerSetting program
the initial value and the loop
displaying the current value
adjusting the power value
testing the program
changing the value faster
the brick status light
the ColorCopy program
the display block
displaying an image
the Eyes program
drawing on the EV3 screen
the EV3Sketch program
further exploration
conclusion
15. arrays
overview and terminology
creating an array
The Array Operations block
length mode
read at index mode
write at index mode
append mode
the ArrayTest program
the Button-Command program
creating the array of commands
displaying the commands
executing the commands
the Colorcount program
the ColorToText my block
the AddColorcount my block
using a data wire to select a sound file
initialization
counting colors
the MemoryGame program
the start of the loop
creating the sequence of lights
the WaitForButtons my block
checking the user’s response
further exploration
conclusion
16. files
the file access block
setting the filename
writing to a file
reading from a file
saving the MemoryGame high score
the FileReader program
adding a menu to the ColorCount program
the CreateMenu_CC my block
the SelectOption my block
selecting a menu option
returning the selected option
creating the my block
the new ColorCount program structure
counting objects
saving and loading the count data
testing
managing memory
further exploration
conclusion
17. data logging
data collection and the EV3
investigating the current power reading
the CurrentpowerTest program
the LogData my block
the CurrentpowerTest2 program
testing the current power with the move steering block
the SteeringTest program
the VerifyLightpointer program
controlling the amount of data
further exploration
conclusion
18. multitasking
more than one start block
the stop program block
avoiding a busy loop
adding lights to the DoorChime program
understanding program flow rules
starting blocks and data wires
using values from a loop or switch block
using my blocks
synchronizing two sequences
keeping out of trouble
further exploration
conclusion
19. a PID-controlled LineFollower program
the PID controller
proportional control
the raw data
the good and bad zones
the good zone
the light side bad zone
the dark side bad zone
the catastrophe zone
selecting the target
collecting the min and max sensor readings
normalizing the sensor reading and target values
enhancing the proportional control LineFollower
implementing PID control
adding the derivative term
adding the integral term
tuning the controller
further exploration
conclusion
A. NXT and EV3 compatibility
motors
sensors
software
B. EV3 websites
C.
Index
Copyright
← Prev
Back
Next →
← Prev
Back
Next →