Closed vetRalph closed 9 years ago
Sorry about the delay, but I'm not really sure on this one, since disabling button handling shouldn't affect the pin outputs. Are you still setting the pins to output?
No problem. I can't believe you spend this much time helping everyone.
Here is the Sketch I used to test it. I am using the same pins except the Start_LED and Trig_LED pins. Once I disabled pin handling taking the TX_PIN low no longer turns the LED on or starts transmit. I hope this is enough info.
I am kind of new at this so I could have something wrong.
RF24 radio(7,8);
RF24Audio rfAudio(radio,0);
.
void setup() {
pinMode(TX_PIN,INPUT_PULLUP); pinMode(VOL_UP_PIN,INPUT_PULLUP); pinMode(VOL_DN_PIN,INPUT_PULLUP); pinMode(REMOTE_TX_PIN,INPUT_PULLUP); pinMode(REMOTE_RX_PIN,INPUT_PULLUP);
pinMode(Start_LED,INPUT_PULLUP); pinMode(Trig_LED,OUTPUT);
rfAudio.begin(); . rfAudio.setVolume(7);
}
void loop() {
if(digitalRead(TX_PIN)){ rfAudio.transmit(); digitalWrite(Start_LED,HIGH); } else { rfAudio.receive(); digitalWrite(Start_LED,LOW); }
Second test: This worked before disabling button handling. Did not work with button handling disabled. void loop()
{
if(digitalRead(Start_LED)){ digitalWrite(Trig_LED,LOW; } else { digitalWrite(Trig_LED,HIGH); }
"I can't believe you spend this much time helping everyone."
Neither can I...
In double checking the code, there is just no possible way for manual button handling to affect pin outputs. There are numerous problems with your code, but I don't do tech. support, so the best I can do is to say check your inputs/outputs and don't call library functions thousands of times per second.
OK, Thanks. I will check it out.
Ralph
Why is it when I disable the button handing it (my term) kills all the pins. For example, I have an external LED connected to pins 2 & 3 that activates when I start transmitting. Pins 2 & 3 are not used by the Minimal example but when I disable button handling they no longer work. Seeing these pins are not used, it seems to me, they should not be effected but that is not the case. In fact it seems to affect all the pins.
Even if I try to reprogram the pins they still don't work.
Thanks Ralph