BrickPi EV3 sensors


Does the brickPi Nodejs language support EV3 sensors? I am working with the EV3 infrared sensor and an EV3 motor. I wrote a program that would make the motor rotate until the proximity value from the infrared sensor was less than 30, then it would stop. Except when I run the program, the motor keeps on going, even if the proximity value is less than 30. Is this because EV3 sensors aren’t supported yet, or is it a flaw in my code? I have attached the file if you want to take a look at it.

I am having a similar problem with the EV3 gyro sensor. I am using the “” code and when I run the program it gives me the error: NameError: name ‘TYPE_SESNOR_EV3_GYRO_M0’ is not defined. Even though when I checked the there were those names there next to several numbers.

What I tried next is moving the gyro program into the folder where was to see if it would make a difference. Now however, on the same “mode” (M0) the program only prints out “0” and the occasional “1” this is despite me tilting it back and forth about 90 degrees and rotating it about its axis left and right 90 degrees.

Could anyone help me?

RaduT, when you’re running the example, which port is the sensor on?

Can you post a picture of your setup?

John, the sensor is in port 4, as mentioned in its code that “the gyro sensor is placed in port 4”