bitofadummy
Member
Hello,
I have a problem with my serial communication, in combination with I2C communication.
Let me first explain my setup.
I have a 3D-printer main board, a SKR-v2 running Reprap firmware 3.3. RRF3 is configured to read a MAX6675-thermocouple board for bed temperature. Then I have a Teensy 3.6 that emulates the max6675 to send the measure temperature. It gets this temperature from a MLX90641 IR array sensor connected via I2C, and using the Seeed_Arduino_MLX9064x-master library. It then filters out the pixels of 8 area’s I am interested in, and it calculates an average bed temperature to be send over SPI to the SKR-2.
Then the 8 area temperatures are used to control 8 heaters with a PID control loop, that calculates the right PWM value for all 8 heaters. To do that it needs a Set-temperature.
It get that from a serial connection with the SKR-2.
A gcode command is send over serial 3: M409 K"heat.heaters[].active"
And RRF3 replies with: {"key":"heat.heaters[].active","flags":"","result":[35.0],"next":0}
That is 67 characters plus a “\n” newline.
Then I filter out the “35.0” and I have my set-temperatur for the heaters…. So far so good.
Except when I also enable the loop that reads the MLX90641 over I2C my serial communication seems truncated, and I receive:
{"key":"heat.heaters[].active","flags":"","result":[35.0],"next
Notice that the last “:0} \n” skipped.
And if the settemp has three digits, let say 100 then “t:0} \n” is skipped.
So the string is always 63 characters long.
So my question is: Is there some link between I2c and Serial communication that could cause this?
Or any other reason why a serial communication might get truncated at 63 characters?
I have a problem with my serial communication, in combination with I2C communication.
Let me first explain my setup.
I have a 3D-printer main board, a SKR-v2 running Reprap firmware 3.3. RRF3 is configured to read a MAX6675-thermocouple board for bed temperature. Then I have a Teensy 3.6 that emulates the max6675 to send the measure temperature. It gets this temperature from a MLX90641 IR array sensor connected via I2C, and using the Seeed_Arduino_MLX9064x-master library. It then filters out the pixels of 8 area’s I am interested in, and it calculates an average bed temperature to be send over SPI to the SKR-2.
Then the 8 area temperatures are used to control 8 heaters with a PID control loop, that calculates the right PWM value for all 8 heaters. To do that it needs a Set-temperature.
It get that from a serial connection with the SKR-2.
A gcode command is send over serial 3: M409 K"heat.heaters[].active"
And RRF3 replies with: {"key":"heat.heaters[].active","flags":"","result":[35.0],"next":0}
That is 67 characters plus a “\n” newline.
Then I filter out the “35.0” and I have my set-temperatur for the heaters…. So far so good.
Except when I also enable the loop that reads the MLX90641 over I2C my serial communication seems truncated, and I receive:
{"key":"heat.heaters[].active","flags":"","result":[35.0],"next
Notice that the last “:0} \n” skipped.
And if the settemp has three digits, let say 100 then “t:0} \n” is skipped.
So the string is always 63 characters long.
So my question is: Is there some link between I2c and Serial communication that could cause this?
Or any other reason why a serial communication might get truncated at 63 characters?