HiTechnic NXT Barometric Sensor for LEGO Mindstorms NXT
The sensor measures atmospheric pressure and temperature.
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
Support for the Barometric Sensor will be available via the RobotC driver suite. RobotC Downloads Page
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
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home1/sb37ht95/public_html/manage/include/vars.inc.php on line 7
|HiTechnic Barometer Block for Mindstorms NXT Software||1.0||July 22nd, 2011||551.92 KB||Download Now|
Note: This version is for the LEGO Mindstorms 2.0 software.
|Altimeter Gauge using the Barometric Sensor for NXT-G 2.0||1.0||July 27th, 2011||1.16 MB||Download Now|
Note: This version is for the LEGO Mindstorms 1.0 software.
|Altimeter Gauge using the Barometric Sensor for NXT-G 1.0||1.0||July 27th, 2011||1.14 MB||Download Now|
Sample programs include a simple sensor viewer, airplane style altimeter gauge, and a calibration program to calibrate the sensor to accurate weather station data.
|Barometric Sensor VIs for LabVIEW 2009||1.0a||August 30th, 2011||145.99 KB||Download Now|