# Help with More Than 2 CE Pins on Raspberry Pi 4

**URL:** https://discourse.nodered.org/t/help-with-more-than-2-ce-pins-on-raspberry-pi-4/32148
**Category:** General
**Created:** [28 August 2020 12:33 UTC](https://discourse.nodered.org/t/help-with-more-than-2-ce-pins-on-raspberry-pi-4/32148 "2020-08-28T12:33:26Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![oncdastan](https://avatars.discourse-cdn.com/v4/letter/o/34f0e0/32.png) [@oncdastan](https://discourse.nodered.org/u/oncdastan)
#### Post date: [28 August 2020 12:33 UTC](https://discourse.nodered.org/t/help-with-more-than-2-ce-pins-on-raspberry-pi-4/32148/1 "2020-08-28T12:33:27Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [27 October 2020 12:33 UTC](https://discourse.nodered.org/t/help-with-more-than-2-ce-pins-on-raspberry-pi-4/32148/2 "2020-10-27T12:33:30Z")

</div>

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