Arduino, HDSDR, OmniRig, CAT things

  Рет қаралды 133

Unrelated Activities

Unrelated Activities

Күн бұрын

Пікірлер: 1
@unrelatedactivities
@unrelatedactivities 19 күн бұрын
/* Reading CAT commands and queries from HDSDR */ // include LCD library: #include // initialize the LCD library by associating any needed LCD interface pin // with the arduino pin number it is connected to const int rs = 2, en = 3, d4 = 4, d5 = 5, d6 = 6, d7 = 7; LiquidCrystal lcd(rs, en, d4, d5, d6, d7); const int numRows = 2; // LCD number of rows const int numCols = 16; // LCD number of columns volatile uint32_t vfo = 7000000ULL; // initial value for vfo freq. (7MHz) String vfoString = ""; // a String to hold incoming data String inputString = ""; // a String to hold incoming data boolean stringComplete = false; // flag whether the string is complete /* SerialEvent occurs whenever a new data comes in the hardware serial RX. This routine is run between each time loop() runs. */ void serialEvent() { while (Serial.available()) { char inChar = (char)Serial.read(); // get the new byte inputString += inChar; // add it to the inputString if (isDigit(inChar)) // check if it is a digit { vfoString += (char)inChar; // convert the incoming byte to a char and add it to the vfoString string vfo = vfoString.toInt(); // update vfo variable with new freq. value } if (inChar == ';') // if the incoming character is a ';' (end of CAT command), { // set a flag so the main loop can do something about it: stringComplete = true; } } } // end of serialEvent() void setup() { Serial.begin(9600); inputString.reserve(200); // reserve 200 bytes for the inputString // set up the LCD's number of columns and rows: lcd.begin(16, 2); lcd.clear(); char buffr[14]; // prepare a char buffer array sprintf(buffr, "FA%011ld;", vfo); // format the string Serial.print(buffr); // send VFO freq command to HDSDR } // end of setup() void loop() { if (stringComplete) { if(inputString == "FA;") // FA; is a SDR VFO frequency query { char buffr[14]; // prepare a char buffer array sprintf(buffr, "FA%011ld;", vfo); // format the response Serial.print(buffr); // answer the query. lcd.setCursor(0, 1); // first column on second line lcd.print(buffr); // print the answer to LCD } lcd.setCursor(0, 0); // first column on first line lcd.print(inputString); // print input string to LCD inputString = ""; // clear the string vfoString = ""; // clear the string stringComplete = false; // change flag delay(500); // wait a moment lcd.clear(); // clear display } } // end of loop()
Playing Music on the Oldest Running Computer in America!
27:06
Usagi Electric
Рет қаралды 375 М.
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
NanoVNA things and simple crystal test
11:47
Unrelated Activities
Рет қаралды 334
PT6311
4:21
Jose Luis Monteiro
Рет қаралды 630
Hacking a weird TV censoring device
20:59
Ben Eater
Рет қаралды 3,4 МЛН
Turn ANY Android Into A REAL VHF Two Way Radio Transceiver
11:45
Tech Minds
Рет қаралды 198 М.
Have you ever seen soldering THIS close?
9:53
Robert Feranec
Рет қаралды 756 М.
Уроки Ардуино. ПИД регулятор
28:57
Заметки Ардуинщика
Рет қаралды 489 М.
Oscilloscopes, Logic Analyzers & More: Meet Red Pitaya
32:44
Electromaker
Рет қаралды 60 М.
Ringing in the New Year with a Vacuum Tube Computer
27:00
Usagi Electric
Рет қаралды 76 М.
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН