Saturday, March 3, 2018

B2B Lab: WeDo 2.0 Motor Blocks...

If you are new to WeDo 2.0, you might need a little clarification on the motor blocks. So this is what they do (according to LEGO Education WeDo 2.0 Programming Blocks by LEGO)

Motor This Way -  Counter Clockwise - Left

Motor That Way -  Clockwise - Right

Motor Off - Stops the motor
1. This is from the perspective of looking at the front of the motor as seen on the programming block.
2. The motors are continuously running until the program tells it to stop - Motor Off block.

Motor On For - Motor on for X seconds and then it stops.
1. The block does not indicate which direction the motor will turn, so you must place before it a Motor This Way or Motor That Way block depending on which way or that way you want it to turn.
2. If you use the block without indicating which direction you want it to turn, it will turn in the direction that was last used.
3. Weird, at zero-seconds, it actually moves. (See - B2B Lab: Exploring with WeDo 2.0)
Motor Power - Determines the power and speed the motor will turn. Power is in the range of numbers 0-9 that can be combined to make a number larger than 9.

Motor Power
1. Zero, of course, is no power.
2. Even though you can put in a large number for the power, it seems that max. is at about 20
3. As power increase so does speed. Plus, the distance the shaft rotates also increases. So if the robot was a vehicle and you increase the power w/o increasing the Wait For, how will it affect the distance traveled? Try it out...

We do know we can have 2 motors connected to 1 Smarthub and they will both be controlled by a single Motor This/That Way or Motor On For block, but you can control them individually. In the LEGO Education WeDo 2.0 Curriculum Pack it shows you how by using the Motor This/That Way (which runs continuously until indicated to stop) block, but you can also use the Motor On For block. Click/Press the block until the Labelling Panel of 6 squares appears above it. Each square has a color assigned to it for each motor - up to 6 motors. Tap the Labelling Panel to change the color and assign that motor on the particular Smarthub. 

Now, we can take it a step further, you can individually select up to 6 motors on the 3 Smarthubs paired with (connected) and programmed by one program string or parallel program strings from one device (tablet/computer). You can select which motors to control on which Smarthubs, as well as assign different power levels the same way with Motor Power blocks, but remember an unselected Motor Power block or unselected Motor This/That Way or Motor On For block will control all motors at that point in the program. 

However, multiple sensors cannot be "selected" (if a sensor on one Smarthub detects, then the response causes all Smarthubs to respond and this is where motor selection can be helpful to control which motors you want to respond. Sound and displays are through the device so it happens exactly where it is in the program string. Imagine, you can turn on and off any motor on any Smarthub in your project - Awesomeness! 


No comments:

Post a Comment