Difference between revisions of "Itty Bitty Buggy: Car Movement Tutorial (mDesigner)"
(→Block: Move) |
(→Example 4: Zig-zagging) |
||
(34 intermediate revisions by the same user not shown) | |||
Line 21: | Line 21: | ||
|} | |} | ||
− | =Block: Turn= | + | ==Example 1: Set move direction of Buggy Base== |
+ | {| class="wikitable" style="background-color:#FEF9E7;" | ||
+ | |'''Note:''' this example is performed in '''offline mode''' [[File:Info_icon.png|24px|link=no_link]].<br> | ||
+ | |} | ||
+ | {| | ||
+ | |||
+ | |style="vertical-align:top;"| | ||
+ | {| class="wikitable" | ||
+ | |+Blocks Used | ||
+ | !Block Category | ||
+ | !Blocks | ||
+ | |- | ||
+ | |bgcolor=FEC254|Events | ||
+ | |[[File:MDesigner_When_Click_Green_Flag_block_new.png|x50px]] [[File:Info_icon.png|24px|link=block_reference]] | ||
+ | |- | ||
+ | |Buggy [[File:IBB_Buggy_icon.png|x30px]] | ||
+ | |[[File:IBB_mDesigner_Car_Block_Direction_Speed_Duration_NoLabels.png|x50px|link=Buggy_Base_(use_with_mDesigner)#Car_-_Move]] [[File:Info_icon.png|24px|link=Buggy_Base_(use_with_mDesigner)#Car_-_Move]] | ||
+ | |} | ||
+ | |||
+ | |style="vertical-align:top;"| | ||
+ | {| class="wikitable" | ||
+ | |+Example | ||
+ | |- | ||
+ | |style="padding:50px;"| | ||
+ | [[File:IBB_mDesigner_Car_Movement_Example1.png]] | ||
+ | |} | ||
+ | |||
+ | |} | ||
+ | |||
+ | '''Description:''' [[how to activate blocks|When activated]], Buggy Base will move forward at max speed (255) for 3 seconds. | ||
+ | |||
+ | ==Example 2: Move forward, then backwards== | ||
+ | {| class="wikitable" style="background-color:#FEF9E7;" | ||
+ | |'''Note:''' this example is performed in '''offline mode''' [[File:Info_icon.png|24px|link=no_link]].<br> | ||
+ | |} | ||
+ | {| | ||
+ | |||
+ | |style="vertical-align:top;"| | ||
+ | {| class="wikitable" | ||
+ | |+Blocks Used | ||
+ | !Block Category | ||
+ | !Blocks | ||
+ | |- | ||
+ | |bgcolor=FEC254|Events | ||
+ | |[[File:MDesigner_When_Click_Green_Flag_block_new.png|x50px]] [[File:Info_icon.png|24px|link=block_reference]] | ||
+ | |- | ||
+ | |bgcolor=FEAD50|Control | ||
+ | | | ||
+ | [[File:mDesigner_v1.6_Forever_block.png|x75px]] [[File:Info_icon.png|24px|link=block_reference]] | ||
+ | |- | ||
+ | |Buggy [[File:IBB_Buggy_icon.png|x30px]] | ||
+ | |[[File:IBB_mDesigner_Car_Block_Direction_Speed_Duration_NoLabels.png|x50px|link=Buggy_Base_(use_with_mDesigner)#Car_-_Move]] [[File:Info_icon.png|24px|link=Buggy_Base_(use_with_mDesigner)#Car_-_Move]] | ||
+ | |} | ||
+ | |||
+ | |style="vertical-align:top;"| | ||
+ | {| class="wikitable" | ||
+ | |+Example | ||
+ | |- | ||
+ | |style="padding:50px;"| | ||
+ | [[File:IBB_mDesigner_Car_Movement_Example2.png]] | ||
+ | |} | ||
+ | |||
+ | |} | ||
+ | |||
+ | '''Description:''' [[how to activate blocks|When activated]], Buggy Base will repeatedly move forward at half speed (127) for 2 seconds, then move backwards at half speed (127) for 2 seconds. | ||
+ | |||
+ | ==Block: Turn== | ||
The Car can be set to turn using the '''Car - Turn''' block. | The Car can be set to turn using the '''Car - Turn''' block. | ||
Line 38: | Line 104: | ||
|} | |} | ||
− | = | + | ==Example 3: Turning left== |
− | + | {| class="wikitable" style="background-color:#FEF9E7;" | |
− | ==Block: | + | |'''Note:''' this example is performed in '''offline mode''' [[File:Info_icon.png|24px|link=no_link]].<br> |
− | + | |} | |
+ | |||
+ | {| | ||
+ | |||
+ | |style="vertical-align:top;"| | ||
+ | {| class="wikitable" | ||
+ | |+Blocks Used | ||
+ | !Block Category | ||
+ | !Blocks | ||
+ | |- | ||
+ | |bgcolor=FEC254|Events | ||
+ | |[[File:MDesigner_When_Click_Green_Flag_block_new.png|x50px]] [[File:Info_icon.png|24px|link=block_reference]] | ||
+ | |- | ||
+ | |Buggy [[File:IBB_Buggy_icon.png|x30px]] | ||
+ | |[[File:IBB_mDesigner_Car_Block_Turn_Speed_Duration_NoLabels.png|x50px|link=Buggy_Base_(use_with_mDesigner)#Car_-_Turn]] [[File:Info_icon.png|24px|link=Buggy_Base_(use_with_mDesigner)#Car_-_Turn]] | ||
+ | |} | ||
+ | |style="vertical-align:top;"| | ||
{| class="wikitable" | {| class="wikitable" | ||
− | | | + | |+Example |
− | + | |- | |
− | + | |style="padding:50px;"| | |
+ | [[File:IBB_mDesigner_Car_Movement_Example3.png]] | ||
|} | |} | ||
− | |||
− | + | |} | |
− | + | '''Description:''' [[how to activate blocks|When activated]], Buggy Base will turn left at max speed (255) for 3 seconds, then stop automatically. | |
− | : | + | ==Example 4: Zig-zagging== |
− | + | {| class="wikitable" style="background-color:#FEF9E7;" | |
− | + | |'''Note:''' this example is performed in '''offline mode''' [[File:Info_icon.png|24px|link=no_link]].<br> | |
− | |||
− | |||
− | |||
|} | |} | ||
+ | {| | ||
− | = | + | |style="vertical-align:top;"| |
− | |||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
+ | |+Blocks Used | ||
+ | !Block Category | ||
+ | !Blocks | ||
+ | |- | ||
+ | |bgcolor=FEC254|Events | ||
+ | |[[File:MDesigner_When_Click_Green_Flag_block_new.png|x50px]] [[File:Info_icon.png|24px|link=block_reference]] | ||
+ | |- | ||
+ | |bgcolor=FEAD50|Control | ||
| | | | ||
− | + | [[File:mDesigner_v1.6_Forever_block.png|x75px]] [[File:Info_icon.png|24px|link=block_reference]] | |
+ | |- | ||
+ | |Buggy [[File:IBB_Buggy_icon.png|x30px]] | ||
+ | |[[File:IBB_mDesigner_Car_Block_Turn_Speed_Duration_NoLabels.png|x50px|link=Buggy_Base_(use_with_mDesigner)#Car_-_Turn]] [[File:Info_icon.png|24px|link=Buggy_Base_(use_with_mDesigner)#Car_-_Turn]] | ||
+ | |} | ||
− | :[[File: | + | |style="vertical-align:top;"| |
+ | {| class="wikitable" | ||
+ | |+Example | ||
+ | |- | ||
+ | |style="padding:50px;"| | ||
+ | [[File:IBB_mDesigner_Car_Movement_Example4.png]] | ||
+ | |} | ||
− | |||
|} | |} | ||
+ | |||
+ | '''Description:''' [[how to activate blocks|When activated]], Buggy Base will repeatedly turn left at half speed (127) for 2 seconds, then turn right at half speed (127) for 2 seconds. This produces a zig-zagging motion. |
Latest revision as of 19:40, 30 October 2018
Contents
Car
Car blocks are blocks which controls both of the motors at the same time in order to move the forward / backwards (Car - Move block) or turn left / right (Car - Turn block). These are convenience functions designed to be "general purpose". Motors can be controlled directly with the Motor blocks. See section #Motors.
Block: Move
The Car's movement direction can be controlled using the Car - Move block.
Function: This blocks controls the Buggy Base to move either forward or backwards at a certain speed for a specified duration.
|
Example 1: Set move direction of Buggy Base
Note: this example is performed in offline mode . |
|
|
Description: When activated, Buggy Base will move forward at max speed (255) for 3 seconds.
Example 2: Move forward, then backwards
Note: this example is performed in offline mode . |
|
|
Description: When activated, Buggy Base will repeatedly move forward at half speed (127) for 2 seconds, then move backwards at half speed (127) for 2 seconds.
Block: Turn
The Car can be set to turn using the Car - Turn block.
Function: This blocks controls the Buggy Base to turn either right or left at a certain speed for a specified duration.
|
Example 3: Turning left
Note: this example is performed in offline mode . |
|
|
Description: When activated, Buggy Base will turn left at max speed (255) for 3 seconds, then stop automatically.
Example 4: Zig-zagging
Note: this example is performed in offline mode . |
|
|
Description: When activated, Buggy Base will repeatedly turn left at half speed (127) for 2 seconds, then turn right at half speed (127) for 2 seconds. This produces a zig-zagging motion.