Serial Monitor on I2C LCD cant get any data to display on second row of LCD

Hello all
I need some help. I am working on a project the reads 4 MLX90614 infrared temperature sensors into an lcd over xbee. I can get two sensors to read on the first line of the lcd, but once i try to get it to print the other two sensors on the second row of the lcd it does not print. I have tried to get the third and forth sensors to print into the serial monitor like the first and second one i cant. All i really need is the right function on the sender arduino that sends the 4 different temperatures to the serial monitor and the right function that reads the 4 sensors on the receiver side and displays 2 of them on the top row and two on the bottom at the same time. My code is posted below. I am using an Adafruit 16x2 LCD with the I2C backpack.

Xbee_reciever_code_for_2_wireless_MLX90614_infrared_temp_sensor.ino (1.7 KB)

xbee_transmitter_for_2_wireless_MLX90614_infrared_temperature_s.ino (3.96 KB)

Most of us here do not want to have to actually load your ".ino" files to examine your problem.

Could you use the "code" tags (as per the instructions on the main forum page) to post your sketches inline?

You may need to put each sketch in a separate post.

I keep seeing these threads ending with, it seems like no solution. I can think of one for the MLX 90614 IR sensor. It works ok with an i2c buss, but it's really a SMBus, they are different. However they are electrically close and the MLX device only responds to read/write word commands.

From my problems with getting this operational, I've found that although the datasheet for the MLX states it defaults to PWM as a factory default, I didn't realize the extent. In fact the default is to set the SDA line for Push/Pull (compared to 'open collector') and runs in PWM mode. Of course if it's the only device, the master can command a start and it brings that device out of PWM mode into command mode. This is when we read the data from the device for temperature. What it does is then go back to PWM mode, taking control of the i2c bus and using the SDA line for it's PWM output. Any device trying to use the bus will likely have a conflict at some point. No matter what the 'other' device is, the output of the MLX will probably swamp it.

I wrote the proper configuration bits (lower three bits cleared) to the device to turn PWM off as a default and to set SDA for open collector operation. Of course if you have more than one on the bus, all device addresses must be different.

I cut the appropriate tables to give you a reference.

Hope it help... :slight_smile:

I hope the OP did not wait nearly two years for your solution :wink: But anyway good for future reference if somebody encounters the same issue :smiley: