|
Post by chrisinkc on Feb 8, 2016 23:01:45 GMT
I would like to add an LED to the DHT node or any node for that matter, that will light up whenever a signal is sent via the RF chip. This would function just like the LED on the Gateway.
I searched the forum and I couldn't find anybody else that was doing this.
The gateway uses D9 as a signal for the LED. In the DHT Node, D9 is being used for the BC547 transistor. Can you just assign another digital output that is not being used?
|
|
|
Post by greginkansas on Feb 9, 2016 0:06:05 GMT
Yes I do this on most of my nodes. On some I put a Led on the RX also. void txRadio() // Transmits the 'mes'-struct to the gateway { digitalWrite(TXLED, HIGH); retx = true; int i = 0;
while (retx && i<6) { if (radio.sendWithRetry(GATEWAYID, (const void*)(&mes), sizeof(mes),5, ACK_TIME)) { retx = false; #ifdef DEBUG Serial.print(" message "); Serial.print(mes.devID); Serial.println(" sent..."); Serial.print("Transmit Level="); Serial.println(radio._transmitLevel,DEC); Serial.print("getAckRSSI="); Serial.println(radio.getAckRSSI(),DEC); // Serial.print(" [radio.RSSI:");Serial.print(radio.RSSI);Serial.println("]"); #endif } else delay(500); i++; } numtx = i; // store number of retransmissions needed #ifdef DEBUG if (retx) Serial.println("No connection..."); #endif digitalWrite(TXLED, LOW); } // end txRadio
|
|