The NXT Barometric Sensor can be used as part of a weather station or to monitor altitude. The sensor can be used to read both atmospheric pressure and temperature. The pressure value from the sensor is in 1/1000th of inch Mercury (inHg) and the temperature is in 1/10th degree Celsius. The NXT-G block allows the NXT to read the pressure in either inHg or hPa (hectopascals) and temperature in either Celsius or Fahrenheit degrees. Once adjusted for current conditions, the block can also calculate altitude in feet or meters.
The sensor measures atmospheric pressure and temperature.
Programming
Mindstorms NXT-G
The Barometric Sensor Block gives you access to both the pressure and temperature data from the sensor. The block let's you select either metric or imperial units. For pressure, the data can be in either in 1/1000th inch of mercury or 1/10th hectopascals. For temperature, the data is either in 1/10th degree Fahrenheit or 1/10th degree Celsius. Note that the native temperature data from the sensor is in Celsius so the Fahrenheit value does not represent actual resolution.
In addition to pressure and temperature data, the NXT-G block also gives you a calculated altitude value in either feet or meters. By default, the altitude calculation is based on a "standard atmosphere" with an altitude pressure at sea-level of 29.921 inHg. The NXT-G block let's you adjust this base altitude pressure by either specifying the known current altitude or by supplying an altitude pressure at sea-level that represents your current conditions.
This and other HiTechnic sensor programming blocks are available from the Mindstorms NXT-G Programming Blocks page.
- The number shows which of your NXT's ports is connected to the Barometric sensor. You can change this number in the configuration panel if you need to.
- The block's data hub will open automatically when the block is placed in the work area. This value output will be either the current absolute barometric pressure, the current temperature, or the current calculated altitude based on the current Action setting.
Configuring the Barometric Sensor Block
The sensor may be connected directly to an NXT sensor port or via the HiTechnic Sensor Multiplexer (MUX). When configuring the sensor via the multiplexer, there are two port selections to make. The first is the NXT to MUX connection and the second, the MUX to SENSOR connection.
The Barometric Sensor block supports seven actions:
- Read Pressure - The value output will be the absolute barometric pressure in 1/1000th inHg (inches of Mercury) or in 1/10th hPa (hectopascals).
- Read Temperature - The value output will be the temperature in 1/10th degrees of either Fahrenheit or Celsius.
- Read Altitude - value will be the approximate altitude based on current barometric pressure and altitude pressure setting.
- Calibrate to Input - Calibrate the barometric pressure using the passed in Input value in either inHg or hPa. This will value will become the current barometric pressure. This calibration will override previous calibrations and will affect future Pressure and Altitude readings. This calibration is saved in the sensor's EEPROM memory.
- Calibrate to Factory - Restore the barometric calibration to the factory setting.
- Set Altitude - Set the Altitude based on the current Input value. The Value output will be the current Altitude Pressure in 1/1000th inHg(regardless of Measurement system selected). Note that this setting is not saved in EEPROM and only applies to subsequent altitude readings within the NXT-G program.
- Set Altitude Pressure - Adjust the altitude setting to a specific altitude pressure. This is similar to setting an altimeter with the Kollsman window. Note that this setting is not saved in EEPROM and only applies to subsequent altitude readings within the NXT-G program.
Other Programming Environments
RobotC
Support for the Barometric Sensor will be available via the RobotC driver suite. RobotC Downloads Page
NXC
NXC is a C like programming language that can access all the features of this sensor.
For more information go to http://bricxcc.sourceforge.net/nbc/.
Example NXC Code
Coming soon...
Downloads
Lego Mindstorms NXT Barometric Sensor
- Brand: HiTechnic
- Product Code:Hitechnic-NXT-Barometric
- Reward Points:69
- Availability:In Stock
-
रo 6,920.00
- Price in reward points:6920
Related Products
Tags: Lego, Mindstorms, NXT, Barometric, Sensor