eclipse / upm

UPM is a high level repository that provides software drivers for a wide variety of commonly used sensors and actuators. These software drivers interact with the underlying hardware platform through calls to MRAA APIs.
MIT License
658 stars 411 forks source link

MLX90614 (I2c.frequency(I2C_STD) failed #701

Closed Segredo12 closed 3 years ago

Segredo12 commented 3 years ago

Hello everyone one.

I'm trying to use the MLX90614 with this library and I'm having some problems to property work with it. I'm using Raspberry Pi 3 Model B+ with the next code: PS: I'm using Java.

System.out.println("MLX90614 Example"); MLX90614 sensor = null; for(int i=0; i<=10; i++) { try { sensor = new MLX90614(i, javaupm_mlx90614.DEVICE_ADDR); System.out.println("Sensor succesfully created !"); break; } catch (Exception e) { System.out.println("Failed to create sensor -> " + e.getMessage()); } } if (sensor != null) { System.out.println("Sensor created. -> " + sensor.name()); System.out.println("Ambient Temperature: " + sensor.readAmbientTempC()); System.out.println("Object Temperature: " + sensor.readObjectTempC()); } I'm having the next exception: "UPM Invalid Argument: MLX90614: I2c.frequency(I2C_STD) failed".

Can someone tell me what I'm doing wrong or it is problem with the hardware ?

Cumpz Segredo.

Segredo12 commented 3 years ago

I discovered that mraa while creating the address was cousing an error with the hardware, so I found another solution using Java and Python at the same time. Executing python scripts and reading its values onto java.

Cumpz.