How do you control Digital I/O to power up the NRF24L01



  • Hi,
    I have a development board that i designed for an Arduino Pro Mini
    It runs from a Lithium battery i.e. about 3.7 to 4.2v
    I have use this board for various projects, it has a 433Mhz Tx board an NRF24L01, a few i2c ports 3v3 & 5v, it has a switched power source (P-Channel Fet) for my sensors that are on the i2c port.
    So i have now come across the Mysensors site and decided to have a try.
    It works fine if i permenantly supply power to the sensors and the NRF24L01, but i cannot get it to switch my P-Channel Fet that controls power for the sensors and the NRF24L01.
    I did read that you have set set the digital I/O for the AVR up in the presentation section, which i have tried.

    Any clues or pointers please?

    Thanks,

    Phil.



  • Fixed -

    You have to use void before() and place it before void presentation()

    void before() {
    pinMode (4, OUTPUT);
    digitalWrite(4, HIGH);
    }

    void presentation()
    {
    // Send the Sketch Version Information to the Gateway
    Serial.print("Send Sketch Info: ");
    sendSketchInfo(SKETCH_NAME, SKETCH_VERSION);
    Serial.print(SKETCH_NAME);
    Serial.println(SKETCH_VERSION);
    wait(LONG_WAIT);


Log in to reply
 

Suggested Topics

15
Online

11.2k
Users

11.1k
Topics

112.5k
Posts