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





  • 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


Log in to reply
 

Suggested Topics

  • 1
  • 6
  • 198
  • 3
  • 1
  • 5

49
Online

11.4k
Users

11.1k
Topics

112.6k
Posts