Xinyuan-LilyGO / T-TWR

Programmable walkie-talkie.
105 stars 13 forks source link

Few Questions about Pins definitions and uses #17

Open richonguzman opened 3 weeks ago

richonguzman commented 3 weeks ago

1) SA868_SQL (pin IO_02) what does it do? just to get notified when Radio Carrier is detected?

2) VLOD A3 / ALDO3 is enable or disabled on T-TWR Plus 2.1 make no difference in radio behavior.

or how is the process of AMP_MUTE, AUDIO_IN, RADIO_MUTE, RADIO_AUDIO_OUTPUT ???

3) AUDIO_IN and AMP_MUTE how and what does it amplify? ESP32_Audio or MIC_Audio or Received_Radio_Audio?

4) `

void checkPTTPressed() {

    if (digitalRead(BUTTON_PTT_PIN)) {
        digitalWrite(SA868_MIC_SEL, LOW);
        digitalWrite(SA868_PTT_PIN, HIGH);
    } else {
        digitalWrite(SA868_PTT_PIN, LOW);
    }
    delay(10);

} `

makes PTT pin trigger the mic and transmit to over VHF Radio, but this:

` void sendTone() { Serial.print("sending Packet: "); Serial.println(packet);

    digitalWrite(SA868_MIC_SEL, HIGH);
    digitalWrite(SA868_PTT_PIN, LOW);

    playTone(SA868_MIC);
    delay(1000);
    stopTone(SA868_MIC);
    digitalWrite(SA868_PTT_PIN, HIGH);

} `

sends tone from ESP32 through Radio VHF.

do you see how digitalWrite(SA868_PTT_PIN, Value) work in oposite ways?

lewisxhe commented 3 weeks ago
  1. https://github.com/Xinyuan-LilyGO/T-TWR/blob/1b8b328bc869da74f30a916a0db5028c74d17a8f/README.md?plain=1#L16
  2. https://github.com/Xinyuan-LilyGO/T-TWR/blob/1b8b328bc869da74f30a916a0db5028c74d17a8f/lib/LilyGo_TWR_Library/src/TWRClass.cpp#L413 https://github.com/Xinyuan-LilyGO/T-TWR/blob/1b8b328bc869da74f30a916a0db5028c74d17a8f/lib/LilyGo_TWR_Library/src/TWRClass.cpp#L87
  3. https://github.com/Xinyuan-LilyGO/T-TWR/blob/1b8b328bc869da74f30a916a0db5028c74d17a8f/lib/LilyGo_TWR_Library/src/TWRClass.cpp#L70
  4. https://github.com/Xinyuan-LilyGO/T-TWR/blob/1b8b328bc869da74f30a916a0db5028c74d17a8f/examples/Factory/Factory.ino#L338
  5. https://github.com/Xinyuan-LilyGO/T-TWR/blob/1b8b328bc869da74f30a916a0db5028c74d17a8f/lib/LilyGo_TWR_Library/src/sa868.cpp#L276