Perform the following exercises 

Medium Motor:

1. Connect the medium motor to the brick on port D

2. Turn the motor on for five seconds at 25% power level.

3. Turn the motor on for five seconds with -75% power level.

4. Turn the motor on for one rotation in both directions.

5. Turn the motor on for 90 degree rotation.

 

Large Motor

1. Connect the tank on ports A and D. Make it run for 2 seconds and then turn 90 degrees.

Group no.3
1. Large Motor program 
-Set all move tank and move steering to “on for rotations”
-Set all the move tank blocks 100 power on each motor
-Set all the move steering blocks to -50 on steering, power to 50 and rotations to 2

This motor program requires a simple vehicle that can turn. I recommend creating a wheel (for the front of the vehicle) using the metal ball and inserting it into a ball socket.
It should move in a square shape.

 

Sensors:

1. The color sensor will detect red color and say red

2. Connect the tank on ports B and C. Connect the color sensor on port 3. Set the tank running. The color sensor will detect dark color (black) and will stop the tank from running.

3. Connect the medium motor on port B. Connect the color sensor on port 3. Vary the speed according to the amount of ambient light.

4. Connect the tank on ports D and C. Connect the color sensor on port 3. Follow the black line.

 

Solution by:
Sohaan, Aditya, Shyam and Rusiru (Group 7)

The speed of the motors has been lowered to make sure the robot follows the black line properly. It also allows time for the robot to change direction. 
Changed the compare type to 5. The robot change direction more accurately when recognising black and white colours.

 


5. Connect an ultrasonic sensor on port 4. Use "Measure > presence" to find the distance of the object.

6. Connect an ultrasonic sensor on port 4. Display a message when an object is closer than 15 cm.

Program for both task 5 and task 6 is shown below:

The purpose
This is the ultrasonic sensor, the purpose is to measure or compare and distance of objects by means sending out a sound and letting it bounce back to it like and echo, it is similar to that of a bat using ultrasonic sensor at night. It gives the best feedback when there are solid surfaces, soft and wrinkles surfaces with only give a vague reading. This sensor is what gives your robot its ‘vision’. It will be able to detect objects to avoid crashing into it. It has an overall sensor length of 0 to 255 centimetres (give or take 3 centimetres). 

The process of using the program 
1. Start with the play button
2. Add a loop and change the number on the top to 9, or as you wish to change it
3.Add the ultrasonic sensor inside of the loop. (Made sure you have downloaded the program from the mindstorms page.)
4. Go to the drop bar at ‘measure’
5.The drop bar will drop another one where you can choose 4 options, choose ‘Distance Centimetres’ 
6. Change the port number to 4
7. Add in the display button
8.Change the option to display, to ‘text’, a drop bar will show choose ‘pixels’ 
9. On the top left there will be a ‘MINDSTORMS’ writing. Click that and change to wired
10.Connect the small block from the ultrasonic sensor to the box in the display button that has a ‘T’ on top of it.
 

 

 

Group no.3
2.  Touch sensor- drive until touch

-Set the first move tank to Power 75  (left and right)
-Set the loop to touch sensor- compare and the state to no.2 (bumped)
-Set the second move tank to “off for rotations”

This program requires a vehicle that drive forward and touch sensor assembled onto it.

 

3. Touch sensor- drive forever

-Set the move tank to “on” and power to 50 (left and right)
-Set the wait block to touch sensor- compare and the state to no. 2 (bumped)
-Set the move steering blocks to “on for rotations”, steering: 50, power: 40 and rotations: 1

This program requires a vehicle that can turn and drive forward. This also requires a touch sensor attached. 

 

 


 

7. Aim: For the Robot to detect an object directly in front of it and push it into the colour red and no further.