Adding NRF24l01 code to existing sketches

  • This isn't entirely MyController related, but as a complete beginner with coding, how can I go about adding the code for an NRF24l01 to a sketch for a sensor that doesn't have it? That is, enabling a sensor to communicate with my gateway.

    I've read the MySensors info on setting the NRF up etc and have sensors running successfully already but I've always used sketches with the code already built in. I need to know how to add it, the "where" and "what" etc. if a sketch for a sensor doesn't have it. Thanks.

  • MOD


    Hi!, have a look here it clearly explains how the sketch should be setup.

    Another option is make use of and existing example found here, these are clear examples that can be modified to suit your needs.

    What type of sensor are you building?

  • That's great thanks, I will read through that to try and make sense of it.

    I have 2 projects at the moment. One is a water level/rain gauge sensor project. I've seen the My Sensors rain gauge sketch but it seems too complex for my needs although I could use it.

    The other is a home "smart meter" for our electricity usage using a non invasive current sensor.

Suggested Topics