我已经从这个项目中获取了现有的代码,并且到目前为止对此非常满意。
然而,我现在处于需要使用我从hitechnic购买的一些第三方传感器的位置,……
我今天从HiTechnic回复,并且在他们允许的情况下,我在这里向大家发布他们的回复。
Hi Nima, There are two types of sensors, digital and analog. The Analog sensors you can basically read like you would the LEGO light sensor. If you have that working then you can read the HiTechnic analog sensors. These include the EOPD, Gyro as well as the Touch Multiplexer. For the TMUX there is [sample NXC code][1] on the product info page. You should be able to use that as a basis if you want to support this device. The other sensors are digital I2C sensors. Most of these sensors have I2C register information on their respective product information page and/or it was included on a sheet that came with the sensor. First of all, to make these sensors work with your framework you need to have I2C communications working. After that it will be a matter of creating your own API that uses the I2C interface with the sensors. I recommend that you download and look at Xander Soldaat's RobotC driver suite for the HiTechnic sensors. You will find this near the bottom of the HiTechnic downloads page. Regards, Gus HiTechnic Support
参考文献: