Task - Calibrate more than one sensor with the Advanced Calibration technique
Following the previous tutorials from the course, implement the calibration of the minimum and maximum values.
- #640
- 04 Oct 2017
Following the previous tutorials from the course, implement the calibration of the minimum and maximum values.
One of the smartest things you could do in any software program is to extract logic in small reusable, simple, understandable units. In EV3-G these are called Blocks and we are going to extract the logic for finding a minimum and maximum for each of the sensors in a new block.
A common question is how to display arrays on the LEGO Mindstorms EV3 brick screen. Displaying values from an array is not different from any other display operation. In this tutorial, we would look at displaying two specific values. The minimum and the maximum for a specific sensor from the Advance Calibration Course Section
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.
One of the interesting things in this sequence of videos is the program. The program detects when the system has reached the maximum speed and then stops the motor from rotating. We detect this with the EV3-G software
In this tutorial, we show you how to display all the values from an EV3-G array on the EV3 brick display. We are using an array Read Operation along with a loop. We are also detecting the loop counter and using it as an index to an array. It's basically the only viable way to do it. The process is commonly referred to as - "Iteration over an array" (although we still do not have an iterator in the programming language, we promise that one day we would do the super advance videos on "iteration" using the LEGO MINDSTORMS robots")
In the EV3-G software, you could use negative numbers for power and rotations. In this episode, we would look at what is the meaning of this numbers and make a few notes of where the teacher must be more careful.
In the current course we would use a number of languages. Generally we would program the robots in EV3-G, but we would also program them in JavaScript to make the parallel with the JavaScript. The programming would include arrays, switches and loops.
There are a number of tools available online to help you play the game. You just seed the initial conditions and leave the game. Let's look at some of the sites.
Display a matrix with "life" and "dead" cells on the EV3 LEGO Mindstorms brick screen. The program is available. You can see it, change it, modify it and learn from it.
Display a matrix on the brick screen. Simple and easy. Download and run the program to see how
Learn to program the Game of Life on the LEGO Mindstorms brick screen. This would require drawing on the brick screen, using blocks with switches and loops.
Following the Advance Sensor Calibration course section, we found the min and max values detected by each sensor. Now it is time for the real deal of the calibration. Detect the current value from the sensor and find what is the percentage of this value for the range between min and max.
The code is already ready. It is attached below the video. Let's see how the program works and what it does and how to use it.
The field in the game of life could be finite or infinite. It is interesting to see and learn how an infinite field behaves and works.
The task is to find what the best seed is that will live the longest without entering into a loop or without dying. Find it and submit in the tasks section.