×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Weather radio don't want connect

  • 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 1 week ago #68972

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

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

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

  • Posts: 2247
  • 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 1 week 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 1 week ago #68977

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

  • Posts: 2247
  • 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 1 week ago #68980
Attachments:

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

  • Posts: 2247
  • 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 1 week ago #68981

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

  • Posts: 2247
  • 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 1 week 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 1 week ago #68985

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

  • Posts: 2247
  • 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 1 week ago by Gonzothegreat.
3 years 1 week ago #68987

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

  • Posts: 2247
  • Thank you received: 223
it works with this:
3 years 1 week ago #68989

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

  • Posts: 1185
  • Thank you received: 370
and what happens if you comment out the begin/endTransmission additionally?
3 years 1 week ago #68991

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

  • Posts: 2247
  • Thank you received: 223
with this, it can see the sensor but not getting the right values


{"MLX90614":{"init":true,"T amb":1037.55,"T obj":1037.55}}
{"MLX90614":{"init":true,"T amb":1037.55,"T obj":1037.55}}
{"MLX90614":{"init":true,"T amb":1037.55,"T obj":1037.55}}
3 years 1 week ago #68992

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

Time to create page: 0.579 seconds