Digital Poti on same Pins as NRF24L01+ how can I solve this?
-
HI,
I would like to use a digital poti (MCP 4131). It uses the SPI.h and PINs 10/11/13 which collides with the NRF24L01+ pins.
How can I solve this?
Many Thanks
Petz
-
Maybe this will help:
-
Because SPI is an Bus, both devices (the MCP 4131 and the NRF24L01+), share the pins 11 (MOSI), 12 (MISO) and 13 (SCK). The fourth pin 10 (CS) needs to be unique to each device. For this any free pin can be used.
One of both libarys (mysensors or mcp4131) needs to be reconfigured to use another pin for CS then pin 10.
-
The Poti only uses SPI.h no other library is involved. And I don't find anything about PIN 10 in the mysensors.h. Where can I change that for the NRF24L01+?
Thanks
Petz
-
@Meister_Petz said:
The Poti only uses SPI.h no other library is involved. And I don't find anything about PIN 10 in the mysensors.h. Where can I change that for the NRF24L01+?
Thanks
Petz
You can construct an instance of the rf24 radio :
MyTransportNRF24 transport(RF24_CE_PIN, RF24_CS_PIN, RF24_PA_LEVEL_GW);
At this point you can define an custom CE and CS Pin.
But it should be also possible to modify the poti code. What code are you using to read it?
-
sorry... I'm blind...
maybe I can change it here:int CS = 10;
sorry again
Suggested Topics
-
Arduino Celebrates 10 years (Malmö/Sweden)
Announcements • 29 Mar 2014, 17:08 • hek 29 Mar 2014, 17:08 -
MQTT-Help me understand about the MQTT Gateway.
Development • 2 Mar 2025, 01:44 • dpcons 29 days ago -
Home Assistant/MySensors quirks
Development • 25 days ago • OldSurferDude 25 days ago -
Counting Incoming and Outgoing Messages from a Gateway
Development • 10 Dec 2024, 21:57 • Trand 14 Dec 2024, 20:23 -
Gateway without a radio
Development • 12 Jan 2025, 23:19 • OldSurferDude 14 Jan 2025, 22:07 -
Radio waking up for no reason.
Development • 4 Jul 2020, 21:09 • Sasquatch 15 Jan 2025, 08:33