Database error: Invalid SQL: update pwn_shop_con set cl=cl+1 where id='385'
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='385') 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='385') 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] 加速NXT Acceleration-北京LEGO乐高//FTC机器人/FLL/竞赛机器人辅导
欢迎信息
当前日期时间
当前时间:
图片
商品详情
加速NXT Acceleration
型号:NAC1040
品牌:   [查询该品牌全部商品]
美元:
Now you can make robots that know
which way is up!
商品售价:¥486.00
订购数量:
订购 加入收藏

商品介绍
详细资料

有了角度传感器你可以让机器人知道哪个方向运动!HiTechnic加速度计/倾斜在三轴加速度方面有着准确的功能。使用角度传感器,可以测量你的机器人的加速度范围在2 g + 2 g。

HiTechnic NXT Acceleration Sensor for LEGO Mindstorms NXT

Introduction

tilt sensor

The NXT Acceleration Sensor contains a three axis accelerometer that measures acceleration in three axes, x, y and z. Acceleration is measured in the range of –2g to +2g with scaling of approximately 200 counts per g.

The Acceleration Sensor connects to an NXT sensor port using a standard NXT wire and uses the digital I2C communications protocol. The acceleration measurement for each axis is refreshed approximately 100 times per second.

The three axes of measurement are labeled x, y, and z as shown.

tilt sensor

The Acceleration Sensor can also be used to measure tilt in three axes. This is possible because gravity is perceived as acceleration. When the sensor is stationary and in the normal horizontal position, the x and y axis will be near zero, because they are horizontal, while the z axis will be near 200, which represents one g. If you tilt the sensor then gravity will also be detected on the other axis and the value for the z axis will go down. Since gravity is distributed among the three component vectors, the tilt of the sensor can be determined.

To test your new sensor, plug it into port 2 of your NXT and select View > Ultrasonic cm > Port 2. Hold the sensor level in your hand and slowly tilt it forward and back. The value displayed on the NXT will represent the acceleration or tilt value for the xaxis and will be in the range of 0 - 254. (0 will display as ?????? while in View mode.) Note that only the x axis can be displayed using the view function.

Programming

Mindstorms NXT-G

The Acceleration Sensor can be programmed using LEGO Mindstorms NXT Software using the Acceleration Sensor Block available as a download.

Acceleration Sensor Block

tilt block

The Acceleration Block will return the value for the positive or negative acceleration for each axis, x, y and z as shown.

In additon, a trigger point may be set for the x axis. The conditions for the trigger will be met whenever the x axis value exceeds the trigger.

Configuring the Acceleration Sensor Block

Image of configuration panel

  1. Choose the port where your Acceleration sensor is plugged in. By default, the block will be set to port 3 for an acceleration sensor. You can change this selection if you need to.
  2. If you choose the Compare function, the block will be triggered when the x axis reading is above or below the selected value; select < "less than" to trigger the block when the reading is below the trigger value or > "greater than" to trigger the block when the reading is above the trigger value. Use the slider to set the trigger value or type it directly into the input box.

Sensor Register Layout

Address

Type

Contents

42H

byte

X axis upper 8 bits

43H

byte

Y axis upper 8 bits

44H

byte

Z axis upper 8 bits

45H

byte

X axis lower 2 bits

46H

byte

Y axis lower 2 bits

47H

byte

Z axis lower 2 bits

Notes:

  • NXT Firmware version 1.05 or later must be loaded in the NXT for the Acceleration Sensor and other digital I2C sensors to operate correctly. You can check the firmware version by displaying the NXT Window in the Mindstorms software.

Other Programming Environments

NXC Programming

Current version of NXC includes an api function for reading the HiTechnic Acceleration Sensor.

bool  ReadSensorHTAccel (const byte port, int &x, int &y, int &z)

For a complete list of HiTechnic API supported by NXC, please refer to the HiTechnic API page of the online NXC Programmer's Guide.

//====================================================================
// Sample Program to display the values from the
// HiTechnic Acceleration Sensor attached to Port 1
//
task main()
{
  int x,y,z;

  SetSensorLowspeed(S1);
  Wait(50);

  while(true) {
    ReadSensorHTAccel(S1, x, y, z);
    TextOut(0,  LCD_LINE1, "x:     ");
    NumOut(6*2, LCD_LINE1, x);
    TextOut(0,  LCD_LINE2, "y:     ");
    NumOut(6*2, LCD_LINE2, y);
    TextOut(0,  LCD_LINE3, "z:     ");
    NumOut(6*2, LCD_LINE3, z);
    
    Wait(100);
  }
}

RobotC

The Acceleration Sensor can also be used with RobotC using the functions provided by th

更多推荐
机电教室套装 ¥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世锦赛机器人/赛前辅导/机器人教室建设/校园创客教室