Winning LEGO MINDSTORMS Programming by James J. Trobaugh & Mannie Lowe
Author:James J. Trobaugh & Mannie Lowe [Trobaugh, James J. & Lowe, Mannie]
Language: eng
Format: epub
Tags: Computers, Programming, General, Hardware
ISBN: 9781430245360
Publisher: Apress
Published: 2012-11-15T05:00:00+00:00
You can perform the calibration in two ways: by using NXT-G’s own Light Calibration block that stores the calibrated values in the NXT’s memory or by creating your own calibration program that stores the values locally in a file on the NXT.
NXT-G Calibration Block
In the NXT-G Advanced Tools menu, there is a Calibration block that is used to calibrate the maximum and minimum levels for both the NXT Light and Sound sensors. The values read by the Calibration block are stored on the NXT brick and remain until they are deleted or the sensors are recalibrated, even if the NXT brick has been turned off.
If you are using two NXT Light sensors on your robot, the calibration values stored by the Calibration block will be applied to both sensors. The NXT does not store separate values for each sensor.
To use the Calibration block, you simply add it to your NXT-G program. Most likely it is in a separate calibration program or at the beginning of the program that you are about to run. If you wish to include it in all of your programs and calibrate before each run, creating a MyBlock with your calibration code is a good idea. Be sure to verify with your event coordinator about when and where calibration is allowed.
You could create a My Calibration block, for example. Within this block, you would have to include two Calibration blocks—one to read the minimum light value and one to read the maximum light value—and some kind of trigger event, such as a Wait block, between the two Calibration blocks. For example, the first Calibration block reads the maximum light value, waits for the NXT orange button to be pressed, and then reads the minimum light value. When you first run this program, you hold the robot’s Light sensor over the lightest surface on the game field, preferably a part of the mat that is white (or a very light color). Next, you move the robot’s Light sensor over a dark area of the mat in order to read the minimum value. Then, you press the orange button on the NXT brick (see Figure 8-4). Figure 8-3 is a simple example of such a calibration program. You might want to elaborate on it by adding display prompts to let the user know where he should place the robot’s Light sensor and what to do next.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8309)
Test-Driven Development with Java by Alan Mellor(6798)
Data Augmentation with Python by Duc Haba(6715)
Principles of Data Fabric by Sonia Mezzetta(6464)
Learn Blender Simulations the Right Way by Stephen Pearson(6367)
Microservices with Spring Boot 3 and Spring Cloud by Magnus Larsson(6235)
Hadoop in Practice by Alex Holmes(5965)
Jquery UI in Action : Master the concepts Of Jquery UI: A Step By Step Approach by ANMOL GOYAL(5814)
RPA Solution Architect's Handbook by Sachin Sahgal(5636)
Big Data Analysis with Python by Ivan Marin(5399)
The Infinite Retina by Robert Scoble Irena Cronin(5325)
Life 3.0: Being Human in the Age of Artificial Intelligence by Tegmark Max(5159)
Pretrain Vision and Large Language Models in Python by Emily Webber(4363)
Infrastructure as Code for Beginners by Russ McKendrick(4132)
Functional Programming in JavaScript by Mantyla Dan(4044)
The Age of Surveillance Capitalism by Shoshana Zuboff(3964)
WordPress Plugin Development Cookbook by Yannick Lefebvre(3845)
Embracing Microservices Design by Ovais Mehboob Ahmed Khan Nabil Siddiqui and Timothy Oleson(3648)
Applied Machine Learning for Healthcare and Life Sciences Using AWS by Ujjwal Ratan(3621)
