-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HT-nxt-angle #3
Comments
I don't have the sensor, but it should be possible to use it with the generic using namespace ev3dev;
sensor angle(INPUT_AUTO, {"ht-nxt-angle"});
assert(angle.connected());
angle.set_mode("ANGLE");
std::cout << angle.value(0) << std::endl; See HiTechnic NXT Angle Sensor for description of the sensor modes and values. |
I'm waiting next release of ev3dev-lang-cpp linked to the last kernel which fix some issues with the NXT angle sensor. |
See #5. |
I'm trying to not use INPUT_AUTO but specify the port. using namespace ev3dev; And I received always the same error :
What's wrong ? |
Succeed ! I replaced INPUT_1 and 4 by |
I was not able to get the HiTechnic Accel sensor working as described in cho934's last post, but the following combinations worked for me. Note the addition of auto accel = sensor(INPUT_AUTO, {"ht-nxt-accel"}); // Works
auto accel = sensor("ev3-ports:in1:i2c1", {"ht-nxt-accel"}); // Works
auto accel = sensor("ev3-ports:in1:i2c1"); // Works whereas the following did not, and left the sensor reporting that it was not connected:
|
Thanks for posting this, the port names have probably changed since then |
Does anyone know where the port names are recorded / is there a changelog somewhere that says what the port names should be? |
Hi, |
Is there some consistent pattern in the port naming (that I can use to predict the port name given the sensor and the input port)? I remember my HiTechnic Irseeker V2 sensor had a port ev3-ports:in8:i2c3 or something, which was really weird to me. |
I just checked, and it's actually "...in(port number here):i2c8" Does anyone know why it is i2c8 instead of i2c1? Thanks in advance |
Side note: HiTechnic compass sensor has i2c1 instead of i2c8 like the irseeker sensor |
After some searching around, i found this https://github.com/ev3dev/lego-linux-drivers/blob/1b387f3bacb4ab8f623494d29a855de6163c8dec/sensors/nxt_i2c_sensor_defs.c#L752 and https://github.com/ev3dev/lego-linux-drivers/blob/1b387f3bacb4ab8f623494d29a855de6163c8dec/sensors/nxt_i2c_sensor_defs.c#L1342 . It seems like the naming rule for an i2c port is |
Hi,
I'm trying to use HT-nxt-angle, but I don't see how to use it using ev3dev-lang-demo or ev3dev-lang-test.
Moreover I saw some issues (ev3dev/ev3dev#555)
Could you please help me ?
The text was updated successfully, but these errors were encountered: