BrickpPi3 and NXT temperature sensor


#1

Hi I’m working in a project to move a lego robo arm (ev3 orginal). We change ev3 controller by a rpi3B and brickpi board. The problem is that we are using a lego NXT temperature sensor. We are coding in python and we are trying with brickpy3.py from dexter and ev3dev libs too. With ev3dev we can get a correct temperature, setting up the sensor as NXT/I2C sensor addess 0x4C and mode NXT-TEMP-C (celsius).

But we don’t get the match with dexter libraries. It’s possible to get the correct temperature configuration for this type of sensor? We tested CUSTOM (analog type)

self.BP.set_sensor_type(self.port_s_TEMP, self.BP.SENSOR_TYPE.CUSTOM, [(self.BP.SENSOR_CUSTOM.PIN1_ADC)])

But we got 4095 value in [0] position.

We tested then with PIN6_ADC and error occurred and with I2C type too :frowning:
This sensor is critic for our project because the robot must to stop when the sensor reach 35ºC or something like that.

Regards!


#3

Dexter Industries does not currently provide drivers to use the NXT temperature sensor with the BrickPi3. However, drivers could be implemented in user-code using sensor type I2C, as in this example.

Matt


#4

Thank you so much Matt.

I tested it, but my knowledge about this kind of devices is low and I think it is impossible for us create a driver or something like that. I don’t know if is easy create a driver, but we don’t know nothing about memory address or something like that on that sensor, so we would try other options.

Thanks again
Regards.