Sample Python3 Code to access a Yaesu Transceivers: VFO A Frequency, Power Output, and Mode. The Code below retreives Data from the Yaesu Transceiver. See the additional Code Snippets below to set VFO A, VFO B, Power Output.

If you have a single File of def Handle_FTdx1200(), other def's, plus your Code then to call the 'def Handle_FTdx1200()' Function - all one has to do, elsewhere in the Code, is, for Example, ...

...
...
(tFreq, tMode, tPower) = Handle_FTdx1200()
print('VFO A Freq. :'+tFreq)
print(' Mode :'+tMode)
print('Power Output:'+tPower)
...
...

If you have a File with the directly above Code, say titled 'myFTdx1200.01.py', but have saved the 'def Handle_FTdx1200()' Function in a different File titled 'SerialPort.py', then the 'myFTdx1200.01.py' File must include ...

import SerialPort

... with all the other 'import's. This is typically at the top Portion of the File.


Return to KF3G
Created: 17.07.2022, Modified: 18.07.2022
©2008 - 2099, Alle Rechte vorbehalten, SJWL