Difference between revisions of "Itty Bitty Buggy: Line Tracing Tutorial (mDesigner)"
(→Example 2: Trace the black line then pause) |
(→Example 2: Trace the black line then pause) |
||
Line 86: | Line 86: | ||
| | | | ||
[[File:mDesigner_v1.6_Wait_block.png|x50px]] [[File:Info_icon.png|24px|link=block_reference]]<br><br> | [[File:mDesigner_v1.6_Wait_block.png|x50px]] [[File:Info_icon.png|24px|link=block_reference]]<br><br> | ||
+ | [[File:MDesigner_v1.6_Repeat_block.pngg|x75px]] [[File:Info_icon.png|24px|link=block_reference]]<br><br> | ||
[[File:mDesigner_v1.6_Forever_block.png|x75px]] [[File:Info_icon.png|24px|link=block_reference]]<br><br> | [[File:mDesigner_v1.6_Forever_block.png|x75px]] [[File:Info_icon.png|24px|link=block_reference]]<br><br> | ||
[[File:mDesigner_v1.6_If_block.png|x75px]] [[File:Info_icon.png|24px|link=block_reference]] | [[File:mDesigner_v1.6_If_block.png|x75px]] [[File:Info_icon.png|24px|link=block_reference]] |
Revision as of 21:28, 1 November 2018
Contents
Line Tracing
Buggy Base contains two Color Detectors and two ColorLEDs. These joined together can be used to detect when a line is detected based on its configured color. With this information, it is possible to steer the motors either left or right to stay on the line. The follow blocks will use the Color Detectors, ColorLEDs to stay along (trace) a line.
Block: Color Trace (Go along color)
Start of line tracing can be called with this block.
Function: This block controls the Buggy Base to follow (trace) along the chosen color line.
|
Example 1: Follow a black line
Note: this example is performed in offline mode . |
|
|
Description: When activated, the program will trace along a black line. Download and print this map to test it out: File:Line Tracing Example1 Map.pdf
Note: This example runs the Color Trace block constantly inside a Forever block. Each time the Color Trace block is called, it adjust the Buggy Base to stay on the line. Therefore, it is important to be constantly call the Color Trace block or else Buggy Base will go off the line. |
Block: Stop Trace
This block stops the motors on Buggy Base and turns off the ColorLEDs (both of which were activated during the Color Trace block call).
Example 2: Trace the black line then pause
Note: this example is performed in offline mode . |
|
|
Description: When activated, the program will repeatedly trace along a black line for 3 seconds, then stop tracing for 3 seconds. Use the same map from example 1 to test it out: File:Line Tracing Example1 Map.pdf
Note:
|