Use an AA-30.ZERO antenna analyzer with node.js.
const AA30Zero = require('AA-30.ZERO');
const aa30 = new AA30Zero('/dev/ttyS0');
aa30.on('measurement', console.log);
aa30.init();
aa30.version().then(v => console.log('version', v));
aa30.scan('24848000', '10000', '100').then(data => {
console.log('Lowest VSWR', data);
});
Just pass the path to your serial port, eg. 'COM4' or '/dev/ttyUSB0':
new AA30Zero('/dev/ttyS0');
- init() - Required - Sets up event handling and data parsing
- version() - Request the AA-30.ZERO's version string
- Returns a Promise which resolves with the version string
- scan(centre, range, samples) - Perform a scan
- centre is the centre frequency in Hz (eg. 14150000)
- range is the sweep range in Hz (eg. 100000 to sweep 50 KHz on either side of centre)
- samples is the number of readings to take across range
- Returns a Promise which resolves with { frequency, vswr } of the measurement with the lowest VSWR
- measurement - Emitted for each measurement that is taken during a scan
- Callback receives an object parameter with frequency and vswr properties