Difference between revisions of "Itty Bitty Buggy: Car Movement Tutorial (mDesigner)"
(→Example 1: Set move direction of Buggy Base) |
(→Block: Turn) |
||
Line 103: | Line 103: | ||
:*'''Speed''' - rate of the motors when turning. A value between 0 and 255. 0 being off, 255 being full speed, and 127 being half speed. | :*'''Speed''' - rate of the motors when turning. A value between 0 and 255. 0 being off, 255 being full speed, and 127 being half speed. | ||
|} | |} | ||
+ | |||
+ | ==Example 3: Move forward, then backwards== | ||
+ | {| class="wikitable" style="background-color:#FEF9E7;" | ||
+ | |'''Note:''' this example is can be performed in '''online''' or '''offline mode'''.<br> | ||
+ | If you plan to use '''online''' mode and previously used '''offline''' mode, [[please follow the instructions to reset back to "online mode".]] | ||
+ | |} | ||
+ | |||
+ | {| | ||
+ | |||
+ | |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_ColorLED_Set_Color_NoLabelsa.png|x50px|link=Buggy_Base_(use_with_mDesigner)#ColorLED_-_Set_Color]] [[File:Info_icon.png|24px|link=Buggy_Base_(use_with_mDesigner)#ColorLED_-_Set_Color]] | ||
+ | |} | ||
+ | |||
+ | |style="vertical-align:top;"| | ||
+ | {| class="wikitable" | ||
+ | |+Example | ||
+ | |- | ||
+ | |style="padding:50px;"| | ||
+ | [[File:IBB_mDesigner_Car_Movement_Example3.png]] | ||
+ | |} | ||
+ | |||
+ | |} | ||
+ | |||
+ | '''Description:''' [[how to activate blocks|When activated]], Buggy Base will turn forward at max speed for 3 seconds. | ||
=Motors= | =Motors= |
Revision as of 01:28, 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 can be performed in online or offline mode. If you plan to use online mode and previously used offline mode, please follow the instructions to reset back to "online mode". |
|
|
Description: When activated, Buggy Base will move forward at max speed for 3 seconds.
Example 2: Move forward, then backwards
Note: this example is can be performed in online or offline mode. If you plan to use online mode and previously used offline mode, please follow the instructions to reset back to "online mode". |
|
|
Description: When activated, Buggy Base will move forward at half speed (127) for 2 seconds, then move backwards at half speed (127) for 2 seconds. Then repeat.
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: Move forward, then backwards
Note: this example is can be performed in online or offline mode. If you plan to use online mode and previously used offline mode, please follow the instructions to reset back to "online mode". |
|
|
Description: When activated, Buggy Base will turn forward at max speed for 3 seconds.
Motors
Motor blocks are blocks which controls the motors on Buggy Base directly. This gives the user the ability to fine tune the behavior of the motors. The motors are referenced as Motor "A" or "B" depending on the side it resides. These blocks can set the movement direction of the motors (Motor - Set Speed block) or brake / stop the motors (Motor - Stop block).
Block: Set Speed
The motors speed and direction can be controlled with the Motor - Set Speed block.
Function: This block sets the speed of the selected motor.
|
Block: Stop
The motors can be stopped with the Motor - Stop block.
Function: This block stops the selected motor.
|