Gapped & Crossed Line Following. Part 8. Turn left state
Next state in our state machine programming pattern is the "Turn Left" state and the corresponding behaviour.
- #211
- 02 Mar 2016
Next state in our state machine programming pattern is the "Turn Left" state and the corresponding behaviour.
One attachment to rule them all...We have seen it and it works -> solving most of the competition models with only one attachment. In this video tutorial without programming we would walk you through the principles and methods of using a single attachment for most of the FIRST LEGO League competition models. One can learn alot from using as few parts as possible to solve as many missions as possible.
In this tutorial, we would implement a program that finds the minimum and maximum value detected by the sensor and stores this two values in an array.
How to approach that fun relief task.
Based on a request we are showing the robot construction with two rear motors instead of a differential. In this way, as a construction, it is closer to more students, but much more challеnging for programing.
It's inevitable. While following this gapped line we would reach a gap. The robot must somehow understand that there is a gap and must make a decision on what to do. For detecting the gap we use the Rotation Sensor. Not the most popular, but very convenient in many cases. Check out the video.
The robot can move with different speed by applying different power to the motors. It will most of the time make smaller deviations when it moves slower. But you can't just move with a power of 10 all the time. This is a way too slow especially for competitions like FIRST LEGO League or World Robot Olympiad. In this video tutorial I would like to discuss the balance between motor power and robot movement error, how does the battery influence the power of the robot and to conduct an EV3-G experiment that will record the values of the Gyro Sensor along with the current power.
This video tutorial contains the final 2 programs for moving straight with a LEGO Mindstorms EV3 robot. The first program is for proportional compensation that just keeps the robot orientation straight, while the second program is for Integral compensation that returns the robot to the straight line when the robot makes a mistake.
This second part continues with importing two previously developed in Episode 53 blocks into our program. With them we can for align to lines. We program the robot to align to the cross line and start following it.
We have the following behavior expectations from you during this course:
You ask the question.
You will probably err before you succeed.
You should work as a team. Share solutions with others, help them and allow them to help you.
When the teacher speaks, this is important to everyone.
You should read your lesson before you come to class.
In the course section for Advance Sensor Calibration we previously showed you how to find the minimum and maximum value for a single LEGO Mindstorms Color Sensor and to store this value in an array. The program was implemented with the EV3-G software. In this tutorial we are going to find the Min and Max for all the four sensors and to store all the 8 values in an array.
Following the Advanced Sensor Calibration course section, it is time to extract the logic for getting a calibrated value into a new block. This block will have an input and on this input, we give the port number. The block will return the calibrated value for this port number. We've built all the other blocks only because of this almost final video here.
The LEGO Mindstorms EV3 set comes with two LARGE motors. But even though these motors look almost the same they are not quite the same. There are always some differences in their behaviour. If you have more than two motors, because you bought them or you won them somewhere at a competition, it is worth doing an experiment to find which pair of motors works best.
The way you move the robot is always imprecise. Don't TRY to fight with this. Programming motors for competitions like the FIRST LEGO League (FLL) or World Robotics Olympiad (WRO) is not very different from programming the motors in the STEM classes. But there are a few things you should have in mind.