×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Weather radio don't want connect

  • Posts: 2255
  • Thank you received: 223
Here's the output of the following commands:

'v' - send current version
'w' - send current weather sensor values
'p' - send current weather sensor values (pretty printed)
't' - send sensor read durations
'c' - send sensor configuration settings

{"version":"1.12"}

{"MLX90614":{"init":false}}

{
"MLX90614": {
"init": false
}
}

null

{}
3 years 4 weeks ago #68963

Please Log in or Create an account to join the conversation.

  • Posts: 2255
  • Thank you received: 223
Using an I2C scanner I can see that the sensor is connected:

Scanning...
I2C device found at address 0x5A !
done
3 years 4 weeks ago #68965

Please Log in or Create an account to join the conversation.

  • Posts: 2255
  • Thank you received: 223
Was able to find a MLX90614 sketch for a Wemos and the sensor works !!! However I cannot make it work with the weatherradio.ino code

results:
3 years 4 weeks ago #68966

Please Log in or Create an account to join the conversation.

  • Posts: 1185
  • Thank you received: 370
Hm. strange. The only problem I remember was having a wire clock set too high. But the wire clock is only changed if the OLED module is activated in weather radio.

Check the configuration of OLED_WIRE_CLOCK_SPEED in config.h. I noticed that it should not be higher than 100kHz:
#define OLED_WIRE_CLOCK_SPEED 100000L // set to 100kHz if using in combination with MLX90614
3 years 4 weeks ago #68972

Please Log in or Create an account to join the conversation.

  • Posts: 2255
  • Thank you received: 223
I do not use an OLED, I've commented that entire section out.
3 years 4 weeks ago #68973

Please Log in or Create an account to join the conversation.

  • Posts: 2255
  • Thank you received: 223
From all the tests I've done, my board and sensor are working using some simple code like the one I've posted earlier, however with the weatherradio.ino it clearly does not work. One think to mention is that it is the only sensor connected.
3 years 4 weeks ago #68975

Please Log in or Create an account to join the conversation.

  • Posts: 1185
  • Thank you received: 370
That’s awkward, there must be something special in your setup. What board do you use?
I think the only way is to add debugging messages into the mlx code of weather radio, especially around mlx.begin(). Maybe out of a strange reason this part never gets reached.
3 years 4 weeks ago #68977

Please Log in or Create an account to join the conversation.

  • Posts: 2255
  • Thank you received: 223
 
I have the WeMos D1 Mini V3.1 (a real one and not a clone).
 

As I mentioned previously, the sensor and board works well with a simple code for the MLX
 
3 years 4 weeks ago #68980
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 2255
  • Thank you received: 223
It's FIXED !!!

The code needs to be changed from:
to
results:
{"version":"1.12"}
{"MLX90614":1}
{"MLX90614":1}
{"MLX90614":{"init":true,"T amb":19.83001,"T obj":20.14999}}
{"MLX90614":{"init":true,"T amb":19.83001,"T obj":20.14999}}
{"MLX90614":{"init":true,"T amb":19.83001,"T obj":20.14999}}
{"MLX90614":{"init":true,"T amb":26.61001,"T obj":37.35}}
{"MLX90614":{"init":true,"T amb":26.61001,"T obj":37.35}}

 
The following user(s) said Thank You: Wolfgang Reissenberger
3 years 4 weeks ago #68981

Please Log in or Create an account to join the conversation.

  • Posts: 2255
  • Thank you received: 223
in fact, just done another test and the line "return (error == 0);" can be commented out completely.
But it's quite slow to update the temperature I must say.
3 years 4 weeks ago #68982

Please Log in or Create an account to join the conversation.

  • Posts: 1185
  • Thank you received: 370
Many thanks for your feedback. I resolved it slightly different. The main bug was that the status was never updated once the initialization was successful:
/**    mlx.begin() always returns true, hence we need to check the I2C adress */
bool isMLX90614Present() {
  Wire.beginTransmission(MLX90614_I2CADDR);
  byte error = Wire.endTransmission();
  mlx.begin();
  mlxData.status = (error == 0);
  return (mlxData.status);
}
 
void updateMLX() {
 if (mlxData.status || (mlxData.status = isMLX90614Present())) {
   mlxData.ambient_t = mlx.readAmbientTempC();
   mlxData.object_t  = mlx.readObjectTempC();
 }
}

Could you please check if this works for you?
3 years 4 weeks ago #68985

Please Log in or Create an account to join the conversation.

  • Posts: 2255
  • Thank you received: 223
thanks for the update, that however breaks everything. Nothing comes out from the W/V/T etc commands..
correction:
I had selected the wrong baud, hence nothing came out.

However, it's back to the original issue:
Weather Radio V 1.12
{"MLX90614":{"init":false}}
{}
null
Last edit: 3 years 4 weeks ago by Gonzothegreat.
3 years 4 weeks ago #68987

Please Log in or Create an account to join the conversation.

Time to create page: 0.924 seconds