Hi all,
After many hours of work, I am ready to release my FT-857D CAT control library for the Arduino IDE.
This library allows the user to control various functions of the radio via serial connection and the CAT control (computer aided transceiver) protocol.
I looked extensively for a library, or even an example sketch which could help me get started but came up empty. I then decided to tackle this challenge and provide a library to encourage other hams to interface their Arduino to their Yaesu (or other) radios.
Please visit my website to download the library, or for additional information (including command structure): www.ve3bux.com
As an example, here is a simple sketch which makes use of the FT857D library:
/*
Created: 2012.08.16
Author: James Buck, VE3BUX
Web: http://www.ve3bux.com
If you use this code and / or the associated library, all I ask is that you "give a nod" by making a small mention
in your code's documentation section. I've worked hard on getting this working, so a little recognition is appreciated. :)
------------------
FT857D_controls_test
This example sketch demonstrates how to use the FT-857D library to control a Yaesu FT-857D radio by calling various commands.
Attach your radio's CAT interface to the following arduino pins to begin:
Radio CAT port GND -> Arduino GND
Radio CAT port TX -> Arduino pin 3
Radio CAT port RX -> Arduino pin 2
If once you compile and upload the code, you are unable to see the lock icon on the radio's LCD display, try reversing
pins 2 and 3. It may be necessary to power down the radio and to reset the Arduino prior to powering the radio back on.
*/
#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
FT857D radio; // define "radio" so that we may pass CAT commands
void setup() {
radio.begin(9600); // as with Serial.begin(9600); we wish to start the software serial port
// so that we may control a radio via CAT commands
}
void loop() {
int dly = 500; // delay for x milliseconds between commands
radio.lock(false); // unlock the radio's controls
delay(dly);
radio.setMode("FM"); // set mode to FM
delay(dly);
radio.setMode("pkt"); // set mode to PKT (note these mode names are NOT case sensitive!)
delay(dly);
radio.setFreq(1407000); // set VFO frequency to 14.070MHz
delay(dly);
radio.lock(true); // lock the radio's controls
delay(dly);
delay(60000); // delay for one minute
}