Ultrasonic sensor

Ultrasonic Sensor Challenge 1.

This task requires the EV3 to travel 20cm from the wall and stop.

This is my coding.

An explanation of the code.

Firstly, a start block is used for starting your program.

Secondly, the move steering block, the program required. Turn it on, keep steering at zero change speed to 13.

Thirdly, the wait block, required to program, on the first piece  change to the ultrasonic sensor compare distance cm. Change the threshold value to 20cm. The last box does not work.

Lastly, the stop brick, the stop brick is used for stopping your program until you press the start button again.

I’ll explain the coding in my screen cast.

The video of the EV3 completing the task.

Ultrasonic Sensor challenge 2.

This task requires.

Programming the EV3 to travel around in a square space without bumping into the walls of the small space.

This is my coding.

Firstly, the loop block. The loop block is used for making the program repeat.

Secondly, the move steering block is turned on. The move steering block is used for steering and speed, AKA power.

Thirdly, the wait brick. The wait brick is used for waiting and selecting different types of sensors. On the sensors used on the wait brick, can change and you can edit the setting for the sensor you chose.

Fourthly, the move steering brick. The move steering brick is on for rotations is used for steering, speed AKA power and rotations.

Fifthly, the large motor block. The large motor block is used for speed AKA power and rotations.

I’ll explain the coding in my screen cast.

Now for the video of my EV3 working.

Hummingbird

Hummingbird Starter Kit

All the wires were supplied with the kit.

The Hummingbird Board.

The outputs tasks are my first priority.

Tri -LED light.

Make a tri-colour LED blink on and off in your favourite colour at least ten times in five seconds. The tri-colour LED should blink evenly – in other words, it should be off for the same amount of time that it is on.

This is the coding.

This is the video.

Module 1: Single Color LEDs

A single colour LED, can be connected to one of four ports on the Hummingbird board. Since you have four ports, you can connect up to four single colour LED. The black LED wire should be connected to the ‘-’ terminal, while the coloured wire should be connected to the ‘+’ terminal as displayed below.

 

  
These images are of the LED light circuit working.
Double LED circuit.
Triple LED circuit.
Quad LED circuit.
Fifth LED circuit.
Now I made a hummingbird vibration sensor.
This is what the vibration coding looks like.
 
This is a video of it working.

Servo Motors.

A Servo Motor is a motor that moves to a particular angle. The Hummingbird Servo Motor can rotate to any angle from 0° to 180°.

What to do.

The servo motor has a small plug. This plug should be connected to one of the four sets of pins in the servos section of the Hummingbird board. Each set of three pins is one servo port. The black wire should be connected to the pin, the red wire to the + and the yellow wire to the S port.

The Servo Motor.

Next step the coding.

Now for the video.

 

3.4

Use a small screwdriver to attach a wheel to the motor so that you can see it move more easily (or just place the wheel on the motor without using a screw). Try several speeds between 0 and 100. Describe how the speed affects the motor. Try several negative speeds. What does it mean for the speed to be negative?

Important Note: You may notice that your motor rotates clockwise for positive numbers, while your neighbour’s rotates counterclockwise for the same number. This just means that you and your neighbour chose ‘+’ and ‘-‘ differently when you connected your motors. Either way is fine!

Coding.

Video.

Exercise 5.1

Run the script above and watch the value of the distance variable change as you move an object back and forth in front of the sensor.

 

Coding.

Video.

 

Exercise 5.2

Write a program that blinks a red light and moves a servo motor when an object is close to the distance sensor. When nothing is near the distance sensor, the light should be off and the servo should not move.
The circuit.

Coding.

Video.

 

 

 

My own project.

Make your own creation.

I’ve made a vibrating TV remote with a light at the front.

Coding.

Video.

 

EV3 Line Follower

What you need to do for the line follower challenge. keep the EV3 on the black line.

This is the EV3 completing the challenge.

The EV3 coding is directing the EV3 to follow the line because of the colour sensor.

 

 

This is the coding for the EV3 to follow the line with it’s colour sensor.

Finally, this is explain on a screen cast about this coding.

EV3 Colour Sensor Challenge

This task required the EV3 to sense the paper strips and stay within the rectangle. The EV3 was also programmed to sense the lines and make an expression.

As the EV3 crossed the paper strips it causes the EV3 to change the expression on the brick.

The EV3 was programmed to locate the lines and the brick will display an expression, a happy face and if not detected an angry expression.

This it the coding required to operate the EV3.