packetint

Arduino-based soundcard interface for packet radio transmissions
git clone git://squid-tech.com/packetint.git
Log | Files | Refs | README

commit e51a2f267232151ef9775bde5dcd3263a7504cf0
Author: joshiemoore <jxm5210@g.rit.edu>
Date:   Fri, 19 Jul 2019 09:44:23 -0400

Initial commit

Diffstat:
Apacket_interface.ino | 35+++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+), 0 deletions(-)

diff --git a/packet_interface.ino b/packet_interface.ino @@ -0,0 +1,35 @@ +void setup() { + // TX detection + pinMode(A0, INPUT); + + // PTT switch + pinMode(2, OUTPUT); + + // TX indicator + pinMode(3, OUTPUT); + + Serial.begin(9600); + + + digitalWrite(2, HIGH); +} + +void loop() { + int tx_read = analogRead(A0); + + Serial.println(tx_read); + + if (tx_read < 469 || tx_read > 499) { + // LOW == PTT on + digitalWrite(1, HIGH); + digitalWrite(2, LOW); + digitalWrite(3, HIGH); + } else { + // HIGH == PTT off + digitalWrite(1, LOW); + digitalWrite(2, HIGH); + digitalWrite(3, LOW); + } + + delay(100); +}