Professional Documents
Culture Documents
v3.0
Introductions and
Administrivia
We are a team.
We do the work to find solutions with guidance from our coaches and
mentors.
We know our coaches and mentors don't have all the answers; we
learn together.
We honor the spirit of friendly competition.
What we discover is more important than what we win.
We share our experiences with others.
We display Gracious Professionalism and Coopertition in everything
we do.
We have FUN!
v3.0
v3.0
We are a team.
The topics we discuss today might be
We
do the work
findare
solutions
something
thingtoyou
alreadywith
doing,
guidance
from you
our coaches
andyear,
mentors.
something
can do this
or
something you should try next year
We know our coaches and mentors don't
have all the answers; we learn together.
Regional Qualifier !
State Tournament !!
We have FUN!
v3.0
10
v3.0
Agenda
Start
End
1:00 PM
3:00 PM
3:00 PM
???
Topic
FLL Advanced Programming and Best Practices
Open Questions and Answers
Topics
Sensors
(including Wait For Blocks and Sensor Calibration)
Squaring Up
MyBlocks
Base Operations
(including Starting Positions and Attachments)
Line Following
Sensors
(including Wait For Blocks
and Sensor Calibration)
04 WaitForDark.rbt
Author: RobotBillMD
Revision: 03
Required Sensors:
Port 3 - Light Sensor
This program drives forward until it detects a black line.
05-WaitForDark.rbt
Author: RobotBillMD
Revision: 05
Required Sensors:
Port 3 - Light Sensor
This program drives forward until it detects a black line. It checks for the
line continually (every 6 degrees) vs. continuously.
Credits: This program is adapted from the program provided by Cougar
Robotics
http://www.cougarrobot.com/index.php?option=com_content&view=categor
y&layout=blog&id=78&Itemid=118
v3.0
v3.0
Back To Agenda
v3.0
v3.0
20
v3.0
Conditional Program
Execution
Switch Blocks
v3.0
23
v3.0
v3.0
Back To Agenda
MyBlocks
v3.0
28
v3.0
A program and all of the MyBlocks it uses share the same list of
variables
Only one copy of a specific MyBlock can run at the same time
If you need to run the same MyBlock concurrently, copy the MyBlock and
give it a different name
29
v3.0
30
v3.0
A MyBlock will be broken if it has two data plugs with the same
name
A MyBlock will be broken if it uses data wires and there is a problem
with the data wire connections
31
v3.0
Back To Agenda
Move Block
Motor Block
Number of motors
controlled
1, 2 or 3
Motor Synchronization?
None
None
Ramp Up
Ramp Down Only if the duration is
degrees or rotations
Constant
Motor Action
* If you choose to control two motors (Example: B & C), the motors will be synchronized
* If you select three motors, motors B & C will be synchronized
34
v3.0
Recommendations
Tip
35
http://paris.utdallas.edu/IEEE-RS-ATR/document/2009/2009-15.pdf
http://www.ieeereliability.com/Newsletter/1_2010/Article1.htm
v3.0
Basic Robot
Maneuverability
Move Blocks and
Motor Blocks
Move Block
Motor Block
Number of motors
controlled
1, 2 or 3
Motor Synchronization?
None
None
Ramp Up
Ramp Down Only if the duration is
degrees or rotations
Constant
Motor Action
* If you choose to control two motors (Example: B & C), the motors will be synchronized
* If you select three motors, motors B & C will be synchronized
41
v3.0
42
v3.0
Motor Blocks with its Next Action Parameter set to Constant will
apply the specified power level throughout the motion of the motor
A Move Block will decrease the power near the end of the motion
(so it does not overshoot the requested duration)
A move block is similar to a Constant Motor Block for most of the duration
followed by a Ramp Down Motor Block in this sense
43
v3.0
Basic Robot
Maneuverability
Driving Straight
Matched motors
http://www.techbrick.com/Lego/TechBrick/TechTips/NXTCalibration/index.htm
Programming
Move vs. motor blocks
Wheel slippage
Friction control
Programming correct/varying power levels
v3.0
Be careful of the
mounting location(s),
because the robot might
have a difficult time
maneuvering away from
the wall
46
v3.0
Basic Robot
Maneuverability
Robot Turns
Tip
48
v3.0
Basic Robot
Maneuverability
am I there yet?
50
v3.0
Basic Robot
Maneuverability
Navigation
52
v3.0
Midterm Guidance
While approaching the mission models, you should
tighten up your navigation accuracy
Terminal Guidance
At the very end of your maneuvering, you must ensure
the accuracy and precision of your navigation are
sufficient to get the job done
Some of the better teams can program some of their missions such that
they can loosely place the robot in the base and have the robot figure
out where it is and where it needs to be after leaving base
53
v3.0
54
v3.0
Back To Agenda
Basic Robot
Maneuverability
Motor Reset Blocks
8.0
2.2
2.3
2.1
1.4
8.0
2.2
2.3
2.1
2.0
8.6
Notes: The last move block in each sequence above uses
brake, all of the others coast.
58
v3.0
v3.0
The main good use of motor reset blocks in FLL is when teams combine more than
one outing into a single longer program (e.g. a menu or sequencer program)
In this case, it is necessary to coast the motor(s) to make it possible to adjust a motorized attachment
between outings, since the program is still running
Coasting the motors may cause large errors to accumulate (as the humans move the coasted motors
between outings) which will forwarded to the next motion, which is definitely not the desired result.
In a sequencer, each outing should begin with a Red Reset and end with a Coast for any relevant motors
Another possible application for the making sure a new motion starts from a fresh
measurement would be the first movement after pushing into a stationary object with
the intent to stall into it, such as having the robot push into a wall until it stalls
At this point, the rotation counts can be unpredictable (especially left to right), and you want your first
movement away from the wall to start at zero accumulated error on both sides
This is only really applicable if you drive into the wall by rotations/degrees (when seconds is really the
better choice when a stall is expected)
Many teams are likely to use degrees anyway because they dont know any better
60
v3.0
Back To Agenda
Multiple Sequence
Beams
Move Forward
v3.0
64
v3.0
The program runs until it reaches the end of all sequence beams or
a stop block whichever comes first
A Block can only start when there are values on all of the input data
wires
A Loop Block or Switch Block cannot start until there are values on
all of the data wires that enter the block
A data wire that starts inside a Loop Block will have a value only
when the Loop Block finishes
A data wire that starts inside a Switch Block will have a value only
when the Switch Block finishes
65
v3.0
66
v3.0
Back To Agenda
Data Wires
(including Constants
and Variables
69
v3.0
70
v3.0
71
v3.0
Each data wire carries a specific type of data between blocks. For
example, if a data wire is dragged from a logic plug on a blocks
data hub, it can only be connected to a logic plug on another blocks
data hub.
Data wires are identified with specific colors:
wires carrying number data are colored yellow
wires carrying logic (true/false) data are colored green
wires carrying text data are colored orange.
72
v3.0
Back To Agenda
Line Following
Follow The Yellow Brick
Road Black Curvy Line
v3.0
77
v3.0
78
v3.0
v3.0
80
v3.0
81
v3.0
82
v3.0
Back To Agenda
Squaring Up
85
v3.0
Back To Agenda
Commenting and
Printing Your Programs
What the Heck Is This
Program Telling Me?
v3.0
v3.0
v3.0
v3.0
Back To Agenda
Base Operations
Time in Base is Time
Not Earning Points
Back To Agenda
Master Programs
or Sequencers
v3.0
Back To Agenda
Other References
(Books, Websites, etc.)
10
v3.0
10
v3.0
10
v3.0
10
v3.0
10
LEGO, FIRST and FLL Do Not Endorse Any Specific Tutorial Software
v3.0
v3.0
10
v3.0
LEGO Education
866-349-5346
7:30AM to 5:30PM CST
LEGO Retail
800-838-9647
7:30AM to 5:30PM CST
10
v3.0
Popular
Reference Books
10
v3.0
11
v3.0
111
v3.0
11
v3.0
11
v3.0
11
v3.0
11
EV3 Tutorial
http://www.stemcentric.com/ev3-tutorial/
LEGO, FIRST and FLL Do Not Endorse Any Specific Tutorial Software
v3.0
11
LEGO, FIRST and FLL Do Not Endorse Any Specific Tutorial Software
v3.0
Back To Agenda
11
Default Usage
Notes
Move Block
Move Block
Touch Sensor
Light Sensor
Color Sensor
Ultrasonic Sensor
v3.0
Tip
B/C
12
v3.0
You can put sound blocks in to have the robot give you audible
signals when the robot does something
Drawback: the soundblocks will take up extra memory in the NXT
You can put breaks in the code by inserting a motor stop block
followed by a wait for block (one possible example provided below)
12
v3.0
Highly Recommended!
File Naming Convention and Regular Backups
Tell the team to use a standard naming convention
One I like is <Persons Initials><Short Description><Version Number>
For example: wbaPickupMeat_v2
v3.0
v3.0
12
Slide in the Bluetooth dongle (some computers do not boot with the dongle installed)
If any NXT device is listed in the Devices list, Remove it (otherwise, a 'Line Busy' error will pop up
later). Make sure 'Turn discovery on' is selected. Close the Bluetooth Devices window.
Switch on the NXT, and select 'Search' from the Bluetooth menu, then 'Connect' to the found
computer. Accept the passcode [1234].
On the PC, a window comes up mentioning that a Bluetooth device is requesting to connect,
asking if you want to allow connection. Click on the message to allow connection. A new window
pops up, asking for the passcode. Type in the passcode and click Next. Again, the NXT beeps to
verify the passcode; press the orange button on NXT to accept.
Open the Bluetooth Devices window. Select the NXT device and press 'Properties'. In the new
window that opens, click the 'Services' tab. Now, Windows starts searching for services that NXT
supports. Select all available services (in my case, two serial ports) and press OK. Windows now
installs some new drivers. After that, close the Bluetooth Devices window.
Now, start the Mindstorms software on the PC, and open the NXT window. Scan for NXT devices,
and after finding NXT, click "Connect" (if not already connected during scanning).
v3.0
Back To Agenda
v3.0