User Tools

Site Tools


amateurlogic_episode_64

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
amateurlogic_episode_64 [2014/03/13 22:54] – [Vegemite or Die!] n9lvsamateurlogic_episode_64 [2014/04/06 12:36] (current) admin
Line 17: Line 17:
  
 **Sponsors** **Sponsors**
-     * GigaParts http://www.gigaparts.com/altv discount on mfj analyzer ALTVFEB.     +     * GigaParts http://www.gigaparts.com/altv     
      * MFJ Enterprises Inc. http://www.mfjenterprises.com      * MFJ Enterprises Inc. http://www.mfjenterprises.com
      * Icom New Year Instant Savings http://www.icomamerica.com      * Icom New Year Instant Savings http://www.icomamerica.com
Line 25: Line 25:
  
      * Dodropin* (Echolink node 355800)      * Dodropin* (Echolink node 355800)
 +
 +**857D Heads Up Code**
 +#include <SoftwareSerial.h>
 +#include "FT857D.h"     // the file FT857D.h has a lot of documentation which I've added to make using the library easier
 +
 +const int dispPin = 6;
 +int dly = 250;
 +String strMode = "Mode: ";
 +String strFreq = "Freq: ";
 +
 +FT857D catDevice;                        // define "catDevice" so that we may pass CAT commands
 +SoftwareSerial lcdDisplay = SoftwareSerial(255, dispPin);
 +
 +void setup() {
 +  pinMode(dispPin, OUTPUT);
 +  digitalWrite(dispPin, HIGH);
 +  
 +  lcdDisplay.begin(9600);
 +  delay(100);
 +  lcdDisplay.write(12);                  // Clear             
 +  lcdDisplay.write(17);                  // Turn backlight on
 +  delay(5);                              // Required delay
 +  lcdDisplay.print("Connecting at");     // First line
 +  lcdDisplay.write(13);                  // Form feed
 +  lcdDisplay.print("4800 Baud!");        // Second line
 +  delay(3000);                           // Wait 3 seconds
 +  lcdDisplay.write(12);
 +  
 +  catDevice.begin(4800);                 // Start listening to the radio
 +}
 +
 +void loop() {
 +  delay(dly);
 +  
 +  lcdDisplay.print(strFreq + catDevice.getFreqMode());
 + 
 +  lcdDisplay.write(13);
 +  byte mode = catDevice.getMode();
 +  String textMode;
 +    
 +    switch(mode) {
 +      case CAT_MODE_FM:
 +        textMode = "FM";
 +        break;
 +      case CAT_MODE_LSB:
 +        textMode = "LSB";
 +        break;
 +      case CAT_MODE_USB:
 +        textMode = "USB";
 +        break;
 +      case CAT_MODE_CW:
 +        textMode = "CW";
 +        break;
 +      case CAT_MODE_AM:
 +        textMode = "AM";
 +        break;
 +      case CAT_MODE_CWR:
 +        textMode = "CWR";
 +        break;
 +      case CAT_MODE_DIG:
 +        textMode = "DIG";
 +        break;
 +      case CAT_MODE_PKT:
 +        textMode = "PKT";
 +        break;
 +      case CAT_MODE_FMN:
 +      default:
 +        textMode = "UNKNOWN";
 +    }
 + 
 +  lcdDisplay.print(strMode + textMode);          
 +  lcdDisplay.write(13);
 +}
  
amateurlogic_episode_64.1394769250.txt.gz · Last modified: 2014/03/13 22:54 by n9lvs

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki