Database error: Invalid SQL: update pwn_shop_con set cl=cl+1 where id='390'
MySQL Error: 1142 (UPDATE command denied to user 'qdm171897234'@'115.29.103.11' for table 'pwn_shop_con')
#0 dbbase_sql->halt(Invalid SQL: update pwn_shop_con set cl=cl+1 where id='390') called at [/data/home/qxu1539450019/htdocs/includes/db.inc.php:73] #1 dbbase_sql->query(update {P}_shop_con set cl=cl+1 where id='390') called at [/data/home/qxu1539450019/htdocs/shop/module/ShopContent.php:86] #2 ShopContent() called at [/data/home/qxu1539450019/htdocs/includes/common.inc.php:524] #3 PrintPage() called at [/data/home/qxu1539450019/htdocs/shop/html/index.php:13] N陀螺仪XT Gyro Sensor-北京LEGO乐高//FTC机器人/FLL/竞赛机器人辅导
欢迎信息
当前日期时间
当前时间:
图片
商品详情
N陀螺仪XT Gyro Sensor
型号: (NGY1044)
品牌:   [查询该品牌全部商品]
美元:
商品售价:¥486.00
订购数量:
订购 加入收藏

商品介绍
详细资料

HiTechnic NXT Gyro Sensor for LEGO Mindstorms NXT

Introduction

The NXT Gyro Sensor contains a single axis gyroscopic sensor that detects rotation and returns a value representing the number of degrees per second of rotation.   The Gyro Sensor can measure up to +/- 360° per second of rotation.

The Gyro Sensor connects to an NXT sensor port using a standard NXT wire and utilizes the analog sensor interface.  The rotation rate can be read up to approximately 300 times per second.

The Gyro Sensor is housed in a standard Mindstorms sensor housing to match the other Mindstorms elements.

 

The axis of measurement is in the vertical plane with the gyro sensor positioned with the black end cap facing upwards is shown.

 

To quick test your new sensor, plug it into port 1 of your NXT brick and select View – Ambient light – Port 1. As you rotate the sensor as shown, you’ll notice that the readings will change from the nominal 40 center value. The faster you rotate the sensor, the larger the deviation from 40. This is a test only and not a demonstration of how the sensor should be used.

 

 

Programming

Mindstorms NXT-G

The Gyro Sensor can be programmed using LEGO Mindstorms NXT-G Software by importing the Gyro Sensor Block.  This and other HiTechnic sensor programming blocks are available from the downloads page. 

Gyro Sensor Block

The Gyro Sensor Block provides access to the sensor output in addition to other features.

 

This plug wires the number for which of your NXT's ports are connected to the Gyro Sensor.

  1. This plug inputs the trigger value.

  2. This plug inputs the trigger compare mode.

  3. This plug outputs the trigger.

  4. This plug inputs the offset value.

  5. This plug outputs the measured rotation rate value.

 

Gyro Sensor Block Front Panel

 

  1. Choose the Port where your Gyro Sensor is plugged in. By default, the block will be set to port 3 for a Gyro Sensor. You can change this selection if you need to.
  2. The output value of the sensor can be influenced by temperature and manufacturing tolerances that may cause a non-zero value when the gyro is stationary. To compensate for this, the zero offset or bias value that can be adjusted for by entering a obtained from the sensor when it is not rotating.
  3. You can adjust the Compare value at which the trigger output will change. 
  4. The trigger output can either select greater than or less than by selecting the Trigger type.  When the output value and condition selected by the Compare are met or exceeded, the trigger state will output a true or false Boolean.

Calculating the Offset Value

To calculate the offset value required to "zero" the gyro output it is necessary to read the value while the gyro sensor is absolutely stationary.  With NXT-G this can be done by reading and either displaying the gyro output which can then be used to enter as an offset or have the program calculate the offset as shown in the example program below.    

The code for this program and other examples can be downloaded from the downloads page.

Other Programming Environments

NXC

The output of the Gyro Sensor can read from NXC by reading the sensor as shown in the following example. 

NXC Example code

#define GYRO_PORT IN_3        //Gyro on port 3
#define GYRO_Offset 602       //offset value to apply to the output value

long Gyro_value;

..

Gyro_value=SensorRaw(GYRO_PORT)-GYRO_Offset;  //read the gyro sensor

..
 

More information regarding NXC is available at http://bricxcc.sourceforge.net/nbc/.

 

RobotC

 

const tSensors GyroSensor          = (tSensors) S1;   //gyro sensor//

#define offset 598       //offset value may vary depending on sensor & temperature
long Gyro_value;

 

task main()
{
   Gyro_value=SensorValue(GyroSensor)-offset;  //read the gyro sensor
....

}

 

For more information go to www.robotc.net/.  

Notes:

The latest version of the gyro block is available at www.hitechnic.com/downloads.

更多推荐
机电教室套装 ¥3,200.00
EV3 Intelligent Brick ¥1,400.00
Robot Football Kit ¥1,120.00
脚注信息

LEGO-北京乐高机器人/FTC竞赛机器人/FLL世锦赛机器人/赛前辅导/机器人教室建设/校园创客教室

京ICP备10034069号-2

LEGO-北京乐高机器人/FTC竞赛机器人/FLL世锦赛机器人/赛前辅导/机器人教室建设/校园创客教室

LEGO-北京乐高机器人/FTC竞赛机器人/FLL世锦赛机器人/赛前辅导/机器人教室建设/校园创客教室

LEGO-北京乐高机器人/FTC竞赛机器人/FLL世锦赛机器人/赛前辅导/机器人教室建设/校园创客教室