Help with More Than 2 CE Pins on Raspberry Pi 4

Hi. Previously, I was reading temperature data with 4 DS18B20s. The problem was the read time. It is 750 ms. This amount is too much for good PID control. So, I switched to PT100 with MAX31865. Now, the problem is I only have 2 CE pins (CE0 and CE1) on Raspberry Pi 4. I tried a few ways to fix this:

First one was to add a few lines to config.txt, but this didn't work (somehow, I now have spidev0.0, spidev0.1, spidev3.0, and spidev3.1. Earlier, I had only the first two. Maybe this change brought them, not sure). I couldn't read the data from the pins I specified.

Second method was leave CE0 empty, and use 4 GPIO pins (one for each) for CS connection. Then, I tried to toggle those pin states at the same time first. The values kept going between -242, and 988. I tried to do the same one by one for each, same results.

Third method was to use CE0 and CE1, but with 2 sensors on each. In this method, I was able to read both of them, but the values came randomly. Sometimes one of them was appearing for 3 seconds, then the other for less than half a second. I was trying to read it every 0.3 seconds. I don't think this is a good way to read it.

Any recommendations? I was thinking of using Firmata protocol to make Arduino read the data and then send 4 temperature values in an array, but I couldn't even turn on an LED with that. This way looks doable to me, so I'd be happy if anyone can guide me on that. Otherwise, I am open to suggestions.

I know this is not really a Node-Red question, but people also use a Raspberry Pi, so I wanted to ask this on this forum.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.