From a1b8c0411932e82dd9611582adbfea1d27323cd8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 30 Jul 2023 11:20:35 -0400 Subject: [PATCH] set pinmode for fm write, send carrier pulse --- cubesatsim/cubesatsim.ino | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index f12ce3cf..3bd1443b 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -263,7 +263,9 @@ void config_gpio() { void program_radio() { if (sr_frs_present) { Serial.println("Programming SR_FRS!"); - + + pinMode(PD_PIN, OUTPUT); + pinMode(PTT_PIN, OUTPUT); digitalWrite(PD_PIN, HIGH); // enable SR_FRS digitalWrite(PTT_PIN, HIGH); // stop transmit @@ -280,15 +282,20 @@ void program_radio() { #ifdef APRS_VHF mySerial.println("AT+DMOSETGROUP=0,144.3900,144.3900,0,8,0,0\r"); // can change to 144.39 for standard APRS #else - mySerial.println("AT+DMOSETGROUP=0,434.9000,435.0000,0,8,0,0\r"); // squelch set to 3 + mySerial.println("AT+DMOSETGROUP=0,434.9000,435.0000,0,8,0,0\r"); // squelch set to 8 #endif sleep(0.5); mySerial.println("AT+DMOSETMIC=8,0\r"); // was 8 } - } + } + digitalWrite(PTT_PIN, LOW); // transmit carrier for 0.5 sec + sleep(0.5); + digitalWrite(PTT_PIN, HIGH); digitalWrite(PD_PIN, LOW); // disable SR_FRS + pinMode(PD_PIN, INPUT); + pinMode(PTT_PIN, INPUT); } /*