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);
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login